【发布时间】:2020-04-17 01:24:05
【问题描述】:
我遇到了一个问题,我已经尝试了一个小时左右,但我似乎无法弄清楚。
当我在我的 app.js 文件中包含谷歌地图然后重新加载时,我从 npm 收到以下错误:
ERROR Failed to compile with 14 errors
5:05:10 PM
This dependency was not found:
* fs in ./node_modules/request/lib/har.js
To install it, you can run: npm install --save fs
This relative module was not found:
* ./config/constants in ./node_modules/googlemaps/lib/index.js, ./node_modules/googlemaps/lib/placeSearchText.js and 11 others Asset Size
但是当我运行 npm install --save fs 它运行并完成但我仍然得到同样的错误。
任何帮助将不胜感激
npm 版本:5.3.0
谷歌地图:最新
节点 Js:6.11.1
【问题讨论】:
-
fs不是 Node 标准的一部分吗?你用的是什么版本的 NPM 和 Node?根据 NPM,fs不再是一个包:npmjs.com/package/fs -
这很奇怪。我想知道为什么谷歌地图需要它作为依赖项?
-
编辑您的问题添加更多信息:NPM 的版本、Node 的版本、Google 地图的版本...