我最近升级了我的计算机,并使用它升级到Node和NPM的最新LTS版本:
我有帆。js0.12。14我正试图使用NPM install
为其安装NPM依赖项的应用程序,但当我这样做时,会出现以下错误:
➜ web-service git:(feature/auth) ✗ npm install
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/package.json'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/README.md'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/LICENSE'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/index.js'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/CHANGELOG.md'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/camelCase.js'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/uniqueId.js'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/bindKey.js'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/unnest.js'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/bindAll.js'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/unset.js'
// a bunch of similar Lodash errors removed from here
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/T.js'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/zipWith.js'
WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/lastIndexOfFrom.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: oauth-sign@0.8.2 (node_modules/oauth-sign):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: Cannot cd into '/Users/Nag/Code/project/web-service/node_modules/.staging/oauth-sign-b13c86db'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: mkdirp@0.5.1 (node_modules/mkdirp):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: Cannot cd into '/Users/Nag/Code/project/web-service/node_modules/.staging/mkdirp-c94c8047'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: minimist@0.0.8 (node_modules/mkdirp/node_modules/minimist):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: Cannot cd into '/Users/Nag/Code/project/web-service/node_modules/.staging/minimist-ba966a6e'
npm ERR! path /Users/Nag/Code/project/web-service/node_modules/.staging/sails-02afd14e/node_modules/@sailshq/body-parser
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/Nag/Code/project/web-service/node_modules/.staging/sails-02afd14e/node_modules/@sailshq/body-parser' -> '/Users/Nag/Code/project/web-service/node_modules/.staging/@sailshq/body-parser-6d1e8405'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Nag/.npm/_logs/2018-01-22T14_40_13_889Z-debug.log
我似乎不知道发生了什么,在网上其他地方也找不到合适的答案。我甚至运行了npm cache clean--force
,rm-rf node_模块
,并重试了类似的错误。当我在节点6上时,它似乎工作得很好,但在升级到节点8.9之后。4和NPM 5.6。0,它不会安装我的依赖项。我如何解决这个问题?
对我来说,这些错误隐藏了真正的根本问题,那就是我的第三方npm存储库(azure devops)的凭据已过期。我不得不重新运行vsts npm auth-config。npmrc
更新my中的令牌。npmrc
文件。
yarn install
或者您可以使用无可选
标志。
npm install --no-optional
尝试删除包锁。json文件。
问题内容: 我从节点应用程序收到此错误: 我知道文件在那里,因为当我尝试使用确切的复制和粘贴路径打开文件时,它可以工作。我也知道应用程序使用的是正确的目录,因为它会在错误中输出它。 问题答案: 波浪形扩展是一件空壳的事情。编写正确的路径名(可能是yourusername )或使用
一切正常,uri正在获取图像和路径,但在第二个acitivty返回时,图像不显示在imageView中,并在logcat中显示,请帮助 E/Ashish://storage/emulated/0/pictures/fotoaula/img_20180329_183302.jpg E/bitmapFactory:无法解码流:java.io.fileNotFoundException://storag
我在节点Js中工作。当我尝试加载文件时:moviedata.json,如下行: 显示: 错误:ENOENT:没有这样的文件或目录,打开'./moviedata.json'在错误(本机)在Object.fs.open同步(fs.js:640: 18)在Object.fs.readFileSync(fs.js:508: 33)在对象。(/用户/dortiz/文档/NodeJS/pruebas/zw/a
方法总是给出这样的错误: 打开失败:ENOENT(没有这样的文件或目录)
我还可以创建目录并使用 我也可以说 然而,我正在遵循一个教程,其中培训师做
问题内容: 我有一个Nodejs Web应用程序,当前正在服务器上成功运行。现在,我正在尝试在开发服务器上设置本地副本。 我目前已经像生产服务器中一样安装了Nodejs,NPM和Mongo,但是当我尝试启动节点服务器时出现以下错误 是什么导致此问题? 问题答案: 您的应用希望在处找到一个文件,但该文件不存在(这意味着)。因此,您要么需要创建预期的目录结构,要么配置您的应用程序,使其在的正确目录中查