简体   繁体   English

如何修复生成的错误:Enoent? 从命令行安装Zurb Foundation for Apps的结果

[英]How to fix a generated Error: Enoent? A result from a command line to install Zurb Foundation for Apps

I installed Node.js and updated my $PATH environment. 我安装了Node.js并更新了$ PATH环境。 However after several attempts to install zurb foundation for apps I get the same errors. 但是,在尝试为应用程序安装zurb Foundation之后,我遇到了相同的错误。 How do I go about fixing it? 我该如何解决? Any insight would be greatly appreciated. 任何见识将不胜感激。 Thanks! 谢谢!

I run this command... 我运行此命令...

npm install -g foundation-cli bower gulp

I get the following errors 我收到以下错误

Error: ENOENT: no such file or directory, stat '/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/upload.js'
    at Error (native)
    at Object.fs.statSync (evalmachine.<anonymous>:849:18)
    at /usr/local/lib/node_modules/npm/node_modules/npm-registry-client/index.js:54:19
    at Array.forEach (native)
    at CachingRegistryClient.RegClient (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/index.js:50:42)
    at new CachingRegistryClient (/usr/local/lib/node_modules/npm/lib/cache/caching-client.js:20:18)
    at /usr/local/lib/node_modules/npm/lib/npm.js:363:22
    at /usr/local/lib/node_modules/npm/lib/config/core.js:82:7
    at Array.forEach (native)
    at /usr/local/lib/node_modules/npm/lib/config/core.js:81:13
npm ERR! Darwin 14.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "foundation-cli" "bower" "gulp"
npm ERR! node v4.1.1
npm ERR! npm  v2.14.4
npm ERR! path /usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/upload.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall stat

npm ERR! enoent ENOENT: no such file or directory, stat '/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/upload.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

I don't think upload.js is a file that should be in that directory. 我不认为upload.js是应该放在该目录中的文件。 I had this exact same error. 我有这个完全相同的错误。 I went to that directory and typed ls -a 我进入该目录并输入ls -a

lrwxr-xr-x   1 jay   admin   105 Dec  7  2013 upload.js -> ../../../../../../Cellar/node/0.10.22/lib/node_modules/npm/node_modules/npm-registry-client/lib/upload.js

It was an old symlink to a version of node long gone installed with homebrew . 这是旧版本的符号链接,旧版本的节点已与homebrew安装。 I remove the symlink reinstalled node, no upload.js was installed so I don't think it's even a file that exist in the current node. 我删除了symlink重新安装的节点,没有安装upload.js,所以我认为它甚至不是当前节点中存在的文件。 But it works now for me!! 但是现在对我有用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM