我从这里https://www.npmjs.com/package/request安装了一个名为Request的npm软件包,但是当我尝试运行该应用程序时,出现以下错误:
ERROR Failed to compile with 1 errors 19:00:14
This dependency was not found:
* fs in ./node_modules/request/lib/har.js
To install it, you can run: npm install --save fs
ERROR in ./node_modules/request/lib/har.js
Module not found: Error: Can't resolve 'fs' in 'C:\wamp\www\node_modules\request\lib'
@ ./node_modules/request/lib/har.js 3:9-22
@ ./node_modules/request/request.js
@ ./node_modules/request/index.js
@ ./resources/js/app.js
@ multi ./resources/js/app.js ./resources/sass/app.scss
我尝试使用以下命令安装fs
库,如错误所示:
npm install --save fs
但是,当我运行该应用程序时,出现了同样的错误,就像它无法识别fs
包一样。
为什么会这样?