当前位置: 首页 > 知识库问答 >
问题:

安装Gulp时NPM错误:错误:ENOENT,lstat

司寇嘉茂
2023-03-14

我正在跑步:

  • 乌班图 14.04
  • 节点 v0.10.25
  • 国家预防控制与预防机制 v 1.3

通过apt-get安装安装了NPM。当我尝试安装Gulp(请参阅代码片段中的命令)时,我遇到了这些失败。我已经尝试过“npm缓存清理”,添加.npmignore文件并添加包。json文件。到目前为止没有任何效果。

有什么想法吗?

sudo npm install gulp gulp-sass gulp-autoprefixer --save-dev

> v8flags@1.0.8 install /home/me/node_modules/gulp/node_modules/v8flags
> node fetch.js

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
 
npm http GET https://registry.npmjs.org/once/-/once-1.3.1.tgz
npm http 200 https://registry.npmjs.org/once/-/once-1.3.1.tgz
npm ERR! weird error 127
npm ERR! tar pack Error reading /home/me/tmp/npm-9540-2Uzl7SBx/1422536234106-0.37079049041494727/package
npm ERR! addLocalDirectory Could not pack "/home/me/tmp/npm-9540-2Uzl7SBx/1422536234106-0.37079049041494727/package" to "/home/me/.npm/readable-stream/1.0.33/package.tgz"
npm ERR! Error: ENOENT, lstat '/home/me/tmp/npm-9540-2Uzl7SBx/1422536233976-0.40873615234158933/package/test/source-map/util.js'
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.13.0-37-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "gulp" "gulp-sass" "gulp-autoprefixer" "--save-dev"
npm ERR! cwd /home/me
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/me/tmp/npm-9540-2Uzl7SBx/1422536233976-0.40873615234158933/package/test/source-map/util.js
npm ERR! fstream_path /home/me/tmp/npm-9540-2Uzl7SBx/1422536233976-0.40873615234158933/package/test/source-map/util.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/home/me/node_modules/gulp-autoprefixer/node_modules/autoprefixer-core/lib/hacks/border-radius.js'
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.13.0-37-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "gulp" "gulp-sass" "gulp-autoprefixer" "--save-dev"
npm ERR! cwd /home/me
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/me/node_modules/gulp-autoprefixer/node_modules/autoprefixer-core/lib/hacks/border-radius.js
npm ERR! fstream_path /home/me/node_modules/gulp-autoprefixer/node_modules/autoprefixer-core/lib/hacks/border-radius.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/home/me/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/index.js'
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.13.0-37-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "gulp" "gulp-sass" "gulp-autoprefixer" "--save-dev"
npm ERR! cwd /home/me
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/me/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/index.js
npm ERR! fstream_path /home/me/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/minimist/index.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/home/me/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/readme.md'
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.13.0-37-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "gulp" "gulp-sass" "gulp-autoprefixer" "--save-dev"
npm ERR! cwd /home/me
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/me/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/readme.md
npm ERR! fstream_path /home/me/node_modules/gulp-autoprefixer/node_modules/gulp-util/node_modules/chalk/readme.md
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)

npm ERR! Error: ENOENT, lstat '/home/me/tmp/npm-9540-2Uzl7SBx/1422536229635-0.048849787563085556/package/test/fixtures/spec/benchmarks/large_empty.scss'
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.13.0-37-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "gulp" "gulp-sass" "gulp-autoprefixer" "--save-dev"
npm ERR! cwd /home/me
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/me/tmp/npm-9540-2Uzl7SBx/1422536229635-0.048849787563085556/package/test/fixtures/spec/benchmarks/large_empty.scss
npm ERR! fstream_path /home/me/tmp/npm-9540-2Uzl7SBx/1422536229635-0.048849787563085556/package/test/fixtures/spec/benchmarks/large_empty.scss
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/me/npm-debug.log
npm ERR! not ok code 0

共有1个答案

朱兴安
2023-03-14

解决了这个问题。显然,你需要nodejs遗留包。一旦我通过apt-get安装了它,所有错误都立即得到了修复。我找到了另一篇文章,解释了为什么有node和nodejs遗留给任何感兴趣的人。

 类似资料:
  • 我正在尝试全局安装我刚刚发布的 npm 模块。每次我尝试从npm或文件夹安装时,我都会收到此错误。 我正在使用sudo,并且我已经三次检查了包中的所有东西,所有东西都应该正常工作。我四处搜索了一下,看到了几个类似的案例,但都没有得到解决。以下是我的尝试。 < li >升级NPM(< code > sudo NPM install-g NPM ) < li >清除全局npm缓存(< code>sud

  • 问题内容: 我正在尝试全局安装刚发布的npm模块。每次尝试从npm或文件夹安装时,都会出现此错误。 我正在使用sudo,并且已对软件包中的所有内容进行了三重检查。我四处搜寻,看到了两个类似的案例,但都没有解决。这是我尝试过的。 升级npm() 清除全局npm缓存() 清除用户npm缓存() 我注意到该错误与我链接到路径的文件有关,特别是在npm尝试执行chmod时。这应该没问题,我的用户具有正常的

  • 我正在尝试使用cmd中的以下命令安装Yeoman: 我得到以下信息: 安装了以下内容: Node.jsv4.4.4 npm v2.15.1,v3.9.0(我尝试了两个版本,我有完全相同的输出消息) 我的电脑在Windows7 x64上运行。 我尝试过的解决方案: > 我跑 npm缓存清除 但是没有运气。 我还尝试了以下方法: > 已删除C:\\AppData\Roaming\npm缓存文件夹 在此

  • 我正在运行npm来安装mnodesql,这是一个用于sql服务器驱动程序的npm库。我安装这个Windows Server 2012盒。 我已经安装了Visual C 2010、node gyp和Python 2.7.x.x作为依赖项,所有这些安装都是成功的。 当我运行npm install msnodesql时,我得到一个红色的大错误: (x86)\MSBuild\Microsoft.Cpp\v

  • 我有一个JS应用程序。它在linux上运行良好,但在Windows10中我遇到了一个错误。 不正确的代码是 我在github中找到了这个错误的原因,我想问题是spawn nodejs spawn Doc在windows中无法正常工作。但我不知道如何修改这段代码使其工作。有人能帮我吗?

  • 我在安装NPM时遇到以下错误: npm WARN Worker-Loader@0.8.1需要WebPack@>=0.9<2^2.1.0-Beta^2.2.0的对等项,但未安装任何对等项。 npm警告可选跳过可选依赖项:fsevents@1.1.2(node_modules\fsevents): npm WARN notsup跳过可选依赖项:fsevents@1.1.2:wanted平台不受支持{“