2017-10-29 94 views
0

我一直在關注Nativescript教程here,但我一直在創建教程項目時遇到問題。我跑了tns doctor,證實我的環境設置正確,但在嘗試創建項目時仍出現一個模糊的錯誤。任何幫助表示讚賞未處理的拒絕錯誤:創建Nativescript項目時出現ENOENT

這裏有兩個錯誤,我越來越:

1)Unhandled rejection Error: ENOENT: no such file or directory, stat 'C:\Users\Nate\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\ee\97\12f9f20988b7890bc5d892b6 f3d12771c88f9ede06c3361e81ad827bea4ddd31e5738f7723ea129e5bf110019f28f9d8d5b7670e3b68d395893e88258282'

2)Command npm.cmd install [email protected] --silent --save-exact --save failed with exit code 1

下面是截圖(更多情況下) enter image description here

回答

2

看起來你的npm緩存中可能會損壞某些東西。你可以嘗試:

npm cache clean 

npm cache verify 

我相信,驗證只在NPM 5+。

+0

我已經運行''NPM緩存clean''和''NPM緩存清理-force'',但沒有任何變化。我也運行了''npm cache verify'',並且沒有任何問題驗證。我不知道是否值得一提,但我錯過了路徑「C:\ Users \ Nate \ AppD ata \ Roaming \ npm-cache \ _cacache \ content-」中的''ee \'' V2 \ SHA512 \ ee''。 –

0

你可以嘗試以下步驟:

npm uninstall nativescript 
npm cache clean 
npm install -g nativescript 

然後

tns create HelloWorld --template nativescript-template-ng-tutorial 
+0

我以前做過這麼多次,但我爲了好的措施再次嘗試過。不幸的是,再次運行它並不能解決我的問題。我甚至強制清理緩存,卸載,重新安裝,仍然有相同的問題。有任何想法嗎? –

相關問題