一尘不染

npm安装错误ENOTDIR

node.js

我是Node.js的新手,尝试使用npm安装Flatiron,但这给我一个错误。

sudo npm install flatiron -g

我得到-

npm http GET https://registry.npmjs.org/flatiron
npm http 304 https://registry.npmjs.org/flatiron
npm ERR! Error: ENOTDIR, mkdir '/home/siddharthsaha/tmp/npm-28554/1353323290836-0.20847953506745398'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.2.0-24-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "flatiron" "-g"
npm ERR! cwd /home/siddharthsaha/denarit
npm ERR! node -v v0.8.14
npm ERR! npm -v 1.1.65
npm ERR! path /home/siddharthsaha/tmp/npm-28554/1353323290836-0.20847953506745398
npm ERR! code ENOTDIR
npm ERR! errno 27
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/siddharthsaha/denarit/npm-debug.log
npm ERR! not ok code 0

怎么了 我没有线索。


阅读 614

收藏
2020-07-07

共1个答案

一尘不染

尝试

sudo mkdir -p /home/siddharthsaha/tmp
sudo npm cache clear

在开始安装脚本之前,因为该npm http 304 https://registry.npmjs.org/flatiron行指出此模块来自缓存。并且还ENOTDIR指出没有目录。因此,清空缓存将解决您的问题。

2020-07-07