npm에 문제가 있습니다. 이것은 내 실수입니다. 더 많은 정보가 필요하면 알려주세요. 나는 무엇이 잘못되었는지 전혀 모른다. 같은 문제가있는 사람을 검색했지만 같은 오류를 찾을 수 없었습니다. 아니면 npm 오류에 대한 문서가 있습니까?
누군가 나를 도울 수 있다면 너무 좋을 것입니다.
hendrik@xxxs-mac-mini assets % npm install
> [email protected] 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.
[email protected] /Users/hendrik/htdocs/xxx_wp/web/wp-content/themes/main_xxx/assets
└── (empty)
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] 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! [email protected] 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 [email protected] 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 + npm을 완전히 제거하려면 다음을 수행하십시오.
/ usr / local / lib로 이동하여 모든 노드와 node_modules를 삭제합니다. / usr / local / include로 이동하고 brew install node로 설치 한 경우 모든 노드 및 node_modules 디렉토리를 삭제 한 다음 터미널에서 brew uninstall node를 실행하여 홈 디렉토리를 확인합니다. 로컬 또는 lib 또는 폴더를 포함하고 거기에서 노드 또는 node_modules를 삭제하고 / usr / local / bin으로 이동하여 노드 실행 파일을 삭제합니다.
이 코드 줄로 npm을 설치 한 것보다 :
npm install -g npm@latest
이 npm 설치 후 작동했습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다