我有一臺運行Ubuntu 16.04的數字海洋虛擬機。我安裝了節點和git。我拉我的回購,並試圖安裝所有的依賴關係。我在項目文件夾中運行npm install
。一切都看起來正確安裝。然後我嘗試運行node server.js
開始我的應用程序,並且我得到各種各樣的module not found errors
。npm install installs,但node_modules爲空
當我看裏面node_modules
,目錄是空的。
任何想法可能發生什麼?
輸出:
[email protected]:~/codetrunk# npm install --save
npm WARN deprecated [email protected]: This package is no longer maintained
npm WARN deprecated [email protected]: This package is deprecated. Use Array.isArray.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: [email protected]<3.0.0 is no longer maintained. Upgrade to [email protected]^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
Killed ...]/extract:alt: verb gentlyRm don't care about contents; nuking /root/codetrunk/node_modules/.staging/alt-983484ae/node
[email protected]:~/codetrunk# ls
app bower.json config.js gulpfile.js models node_modules package.json public server.js views
[email protected]:~/codetrunk# cd node_modules/
[email protected]:~/codetrunk/node_modules# ls
[email protected]:~/codetrunk/node_modules# ls
[email protected]:~/codetrunk/node_modules#
是不是你所依賴的所有軟件包都被棄用了。也許這就是原因。 –
你有package.json文件嗎?嘗試運行npm init – vincentjp
你有沒有發現任何解決方案? – kbariotis