我一直有一個問題,我一直試圖找出一個小時左右,我似乎無法弄清楚。NPM拋出缺少的依賴關係,但它存在嗎?
當我包括我的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安裝--save fs的運行和完成,但我仍然得到相同的錯誤。
任何幫助,將不勝感激
NPM版本:5.3.0
谷歌地圖:最新
節點JS:6.11.1
節點標準不是'fs'的一部分嗎?你使用的是什麼版本的NPM和節點?根據NPM,'fs'不再是一個包:https://www.npmjs.com/package/fs – lilezek
這很奇怪。我想知道爲什麼谷歌地圖需要它作爲依賴? – Dazeh
編輯您的問題添加更多信息:NPM的版本,Node的版本,谷歌地圖的版本... – lilezek