无法解决我的npm install问题

如何解决无法解决我的npm install问题

我的npm有问题。这是我的错误。如果您需要更多信息,请告诉我。我不知道怎么了我搜索有相同问题的人,但找不到相同的错误。还是有关于npm错误的文档?

如果有人能帮助我,那就太好了。

hendrik@xxxs-mac-mini assets % npm install

> sharp@0.23.4 install /Users/hendrik/htdocs/xxx_wp/web/wp- 
content/themes/main_xxx/assets/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild 
&& node install/dll-copy)

info sharp Using cached /Users/hendrik/.npm/_libvips/libvips-8.8.1-darwin-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=6.9.2 runtime=node arch=x64 
libc= platform=darwin)
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack /usr/local/lib/node_modules/npm/node_modules/node- 
gyp/node_modules/mkdirp/lib/opts-arg.js:7
gyp ERR! stack     opts = { mode: 0o777,fs,...opts }
gyp ERR! stack                               ^^^
gyp ERR! stack SyntaxError: Unexpected token ...
gyp ERR! stack     at Object.exports.runInThisContext (vm.js:76:16)
gyp ERR! stack     at Module._compile (module.js:542:28)
gyp ERR! stack     at Object.Module._extensions..js (module.js:579:10)
gyp ERR! stack     at Module.load (module.js:487:32)
gyp ERR! stack     at tryModuleLoad (module.js:446:12)
gyp ERR! stack     at Function.Module._load (module.js:438:3)
gyp ERR! stack     at Module.require (module.js:497:17)
gyp ERR! stack     at require (internal/module.js:20:19)
gyp ERR! stack     at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node- 
gyp/node_modules/mkdirp/index.js:1:79)
gyp ERR! stack     at Module._compile (module.js:570:32)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node- 
gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/hendrik/htdocs/xxx_wp/web/wp- 
content/themes/main_xxx/assets/node_modules/sharp
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v7.1.0
gyp ERR! Node-gyp failed to build your package.
gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the 
package author.
xxx@1.0.0 /Users/hendrik/htdocs/xxx_wp/web/wp-content/themes/main_xxx/assets
└── (empty)

npm WARN xxx@1.0.0 No description
npm WARN xxx@1.0.0 No repository field.
npm WARN xxx@1.0.0 No license field.
npm ERR! Darwin 19.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! sharp@0.23.4 install: `(node install/libvips && node install/dll-copy && prebuild- 
install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the sharp@0.23.4 install script '(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do,this is most likely a problem with the sharp package,npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sharp
npm ERR! Or if that isn't available,you can get their info via:
npm ERR!     npm owner ls sharp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/hendrik/htdocs/xxx_wp/web/wp-content/themes/main_xxx/assets/npm-debug.log
npm ERR! code 1

解决方法

所以我回答我自己的问题。我完全卸载了npm和node。我是通过本教程完成的:

要完全卸载node + npm,请执行以下操作:

转到/ usr / local / lib并删除任何节点和node_modules 转到/ usr / local / include并删除任何node和node_modules目录 如果您是通过brew install节点安装的,则在终端中运行brew install节点 检查您的主目录中是否有任何本地或lib或包含文件夹,并从此处删除任何节点或node_modules 转到/ usr / local / bin并删除任何节点可执行文件

比起我用以下代码行安装npm:

npm install -g npm@latest

此npm安装成功后。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?