npm为本地软件包卸载会引发错误“ saveError ENOENT:无此类文件或目录,请打开'/Users/vikramanna/package.json'”

时间:2018-10-27 15:39:17

标签: npm appium

我尝试使用以下命令

Vikrams-MacBook-Pro:~ vikramanna$ npm list --depth=0
/Users/vikramanna
├── appium@1.9.2-beta.2
└── npm@6.1.0

npm卸载appium@1.9.2-beta.2

但是它抛出如下错误

/Users/vikramanna/.node-gyp/11.0.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
3 warnings and 2 errors generated.
make: *** [Release/obj.target/addon/src/heapdump.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.6.0
gyp ERR! command "/usr/local/Cellar/node/11.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/vikramanna/node_modules/heapdump
gyp ERR! node -v v11.0.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN saveError ENOENT: no such file or directory, open '/Users/vikramanna/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/vikramanna/package.json'
npm WARN vikramanna No description
npm WARN vikramanna No repository field.
npm WARN vikramanna No README data
npm WARN vikramanna No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 (node_modules/heapdump):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

audited 330458 packages in 10.794s
found 7 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

我尝试使用Google搜索,但未找到任何解决方案,这里可能出什么问题了?

1 个答案:

答案 0 :(得分:0)

这是在鸦片https://github.com/appium/appium/issues/11587侧的虫子。请参阅appium gihtub存储库中的问题链接