相关疑难解决方法(0)

无法在Ubuntu中使用节点包管理器安装包

由于名称与另一个包冲突,nodeUbuntu上的NodeJS解释器名称()已重命名为nodejs.这是自述文件.Debian说:

Node.js解释器命令的上游名称是"node".在Debian中,解释器命令已更改为"nodejs".

这样做是为了防止命名空间冲突:其他命令在其上游使用相同的名称,例如来自"node"包的ax25-node.

必须将调用Node.js作为shell命令的脚本更改为使用"nodejs"命令.

但是,使用nodejs会破坏使用安装包npm.程序包安装失败,并显示以下错误:

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian
Run Code Online (Sandbox Code Playgroud)

如何让npm了解nodejs已安装在系统上,但解释器名称有所不同?

ubuntu node.js npm

491
推荐指数
11
解决办法
24万
查看次数

`yo angular`给出错误:npm ERR!代码ENOENT npm ERR!errno 34(是的,我已清理缓存并设置.npmignore)

我试图yo angular在一个新的项目目录中运行,但它给了我一路上的ENOENT错误.是的我看过这个类似的问题,但它的解决方案对我不起作用.

我在运行前在空的新项目目录上运行了这些东西yo angular:

touch .npmignore
npm cache clear
npm cache clean
Run Code Online (Sandbox Code Playgroud)

但我仍然得到:

npm ERR! Error: ENOENT, lstat '/home/ubuntu/app_c/node_modules/grunt/    internal-tasks/bump.js'
npm ERR! If you need help, you may report this *entire* log, 
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.2.0-54-virtual
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/  npm" "install"
npm ERR! cwd /home/ubuntu/app_c
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /home/ubuntu/app_c/node_modules/grunt/internal-tasks/bump. …
Run Code Online (Sandbox Code Playgroud)

node.js npm angularjs yeoman yeoman-generator

21
推荐指数
2
解决办法
2万
查看次数

安装yeoman时出错

我想在我的ubuntu v16.4 LTS上安装你,但我收到这个错误:

npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v6.2.0
npm ERR! npm  v3.9.0
npm ERR! path /usr/local/lib/node_modules/yo/lib/cli.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/yo/lib/cli.js'
npm ERR! enoent ENOENT: no such file or directory, …
Run Code Online (Sandbox Code Playgroud)

ubuntu npm yo

11
推荐指数
1
解决办法
1033
查看次数

无法使npm install -g为我的包工作

我正在尝试将CLI功能添加到我的npm包拦截代理中.我找不到任何好的文档,所以我基本上复制并修改了express.js中的东西.

我补充说:

"bin": {
    "intercept-proxy": "./bin/intercept-proxy"
}
Run Code Online (Sandbox Code Playgroud)

...到我的package.json文件并创建了一个包含CLI内容的/bin/intercept-proxy.js.

当我跑:

npm install -g intercept-proxy
Run Code Online (Sandbox Code Playgroud)

......一切正常,直到连接部分.然后它失败了,说:

npm ERR! Error: ENOENT, chmod 'C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules\intercept-proxy\bin\intercept-proxy
Run Code Online (Sandbox Code Playgroud)

......并且日志说:

381 info linkStuff intercept-proxy@0.2.4
382 verbose linkBins intercept-proxy@0.2.4
383 verbose link bins [ { 'intercept-proxy': './bin/intercept-proxy' },
383 verbose link bins   'C:\\Users\\johan.obrink.24HRCOM\\AppData\\Roaming\\npm',
383 verbose link bins   true ]
384 verbose linkMans intercept-proxy@0.2.4
385 verbose rebuildBundles intercept-proxy@0.2.4
386 verbose rebuildBundles [ 'commander', 'mkdirp', 'underscore' ]
387 info C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules\intercept-proxy unbuild
388 verbose from cache C:\Users\johan.obrink.24HRCOM\AppData\Roaming\npm\node_modules\intercept-proxy\package.json
389 info preuninstall intercept-proxy@0.2.4
390 info …
Run Code Online (Sandbox Code Playgroud)

node.js npm

7
推荐指数
1
解决办法
3190
查看次数

运行`yo angular`时有很多"npm ERR!"

我想让Yeoman工作,但这是一个接一个的墙.感谢上帝的stackoverflow和所有你帮助的好人.无论如何 ...

我一直想跑yo angular.但我得到了一堆npm ERR!包括:

npm ERR! Please try running this command again as root/Administrator.
Run Code Online (Sandbox Code Playgroud)

由于我不能使用suo,我遵循了大多数人接受的建议,并改变了一些希望解决这个问题的配置.以下是我运行的命令,这些命令基于建议.

但我仍然得到同样的错误!

这是我yo angularnpm-debug.log

这是我yo angularstderr.log

这是我yo angularstdout.log

我该如何解决这些错误?

非常感谢你提前.


更新:

在alex的建议之后sudo chown ubuntu /home/ubuntu/tmp -Rv,root运行错误确实消失了,但是yo angular在新目录中运行后我仍然遇到这些错误.我正在显示错误cat -n stderr.log | grep -ir err(这很奇怪,npm-debug.log这次没有生成):

   218  npm ERR! Error: ENOENT, lstat '/home/ubuntu/youtube_5/node_modules/grunt/lib/grunt/task.js'
   219  npm ERR! If you need help, you …
Run Code Online (Sandbox Code Playgroud)

node.js angularjs yeoman yeoman-generator

2
推荐指数
1
解决办法
3191
查看次数

标签 统计

node.js ×4

npm ×4

angularjs ×2

ubuntu ×2

yeoman ×2

yeoman-generator ×2

yo ×1