hendrik-eg
hendrik-eg

Reputation: 7

not able to fix my problem with npm install

I have a problem with my npm. This is my error. If you need more informations let me know. I have no idea what's wrong. I search for someone with the same problem but I was not able to finde the same error. Or is there a documentation about npm errors?

It would be so nice if anyone can help me.

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

Upvotes: 0

Views: 3031

Answers (1)

hendrik-eg
hendrik-eg

Reputation: 7

So I answer my own question. I deinstalled npm and node completely. I done it with this tutorial:

To completely uninstall node + npm is to do the following:

go to /usr/local/lib and delete any node and node_modules go to /usr/local/include and delete any node and node_modules directory if you installed with brew install node, then run brew uninstall node in your terminal check your Home directory for any local or lib or include folders, and delete any node or node_modules from there go to /usr/local/bin and delete any node executable

Than I installed npm with this line of code:

npm install -g npm@latest

After this npm install worked.

Upvotes: 0

Related Questions