LoginSignup
12
7

More than 3 years have passed since last update.

Angular " Can't resolve 'fs' in ~ " の対処法

Last updated at Posted at 2018-11-17

各種バージョン

  • Angular CLI: 7.0.6
  • Node: 10.13.0
  • OS: win32 x64
  • Angular: 7.0.4

エラーの詳細

外部ライブラリを導入しng serveを実行したところ
Module not found: Error: Can't resolve 'fs' in 'C:\
というコンパイルエラーが出た。
npm install fs --save
等、諸々をインストールしたけれど、ダメ。

解決策

packge.json

package.json
"browser": {
    "fs": false
}

を足したらコンパイルできた。

12
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
7