2017-10-29 76 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

我以前做过这么多次,但我为了好的措施再次尝试过。不幸的是,再次运行它并不能解决我的问题。我甚至强制清理缓存,卸载,重新安装,仍然有相同的问题。有任何想法吗? –

相关问题