Unable to run npm install legacy-peer-deps on Apple MacBook M2 Chip #122540
Replies: 3 comments
-
I'm using a Macbook M1 and I've encountered similar errors before. I've tried the following steps:
These are all the methods I've tried before, I hope it helps you. If the answer is correct, please confirm that it is accurate. I am in the process of conquering "Galaxy Brain" by helping people solve problems. |
Beta Was this translation helpful? Give feedback.
-
Have you been able to delete |
Beta Was this translation helpful? Give feedback.
-
its because the gyp, the gyp is python solution for use with node. Upgrade your nodejs to LTS version, and run on the project root: ´´´ after this, try npm install again. In my M2 i dont have any problems with npm... |
Beta Was this translation helpful? Give feedback.
-
npm ERR! code 1
npm ERR! path /Users/shabharishwarankathiresan/Documents/Ultron 2.0/selline/node_modules/@parcel/watcher
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! CC(target) Release/obj.target/nothing/../../node-addon-api/nothing.o
npm ERR! LIBTOOL-STATIC Release/nothing.a
npm ERR! CXX(target) Release/obj.target/watcher/src/binding.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/shabharishwarankathiresan/Documents/Ultron 2.0/selline/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/shabharishwarankathiresan/Documents/Ultron 2.0/selline/node_modules/@parcel/watcher/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/shabharishwarankathiresan/Documents/Ultron 2.0/selline/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/shabharishwarankathiresan/Library/Caches/node-gyp/16.13.1/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/shabharishwarankathiresan/Library/Caches/node-gyp/16.13.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/shabharishwarankathiresan/Documents/Ultron 2.0/selline/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/shabharishwarankathiresan/Library/Caches/node-gyp/16.13.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/shabharishwarankathiresan/Documents/Ultron 2.0/selline/node_modules/@parcel/watcher',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! clang: error: no such file or directory: '2.0/selline/node_modules/node-addon-api'
npm ERR! make: *** [Release/obj.target/watcher/src/binding.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error:
make
failed with exit code: 2npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/shabharishwarankathiresan/Documents/Ultron 2.0/selline/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 23.4.0
npm ERR! gyp ERR! command "/Users/shabharishwarankathiresan/.nvm/versions/node/v16.13.1/bin/node" "/Users/shabharishwarankathiresan/Documents/Ultron 2.0/selline/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/shabharishwarankathiresan/Documents/Ultron 2.0/selline/node_modules/@parcel/watcher
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
Hi Devs,
I am trying to do npm install for the legacy project for past 3 days and finding it difficult to do.
I am using,
Nodejs: 16.13.1
Npm: 8.1.2
Need your help on this.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions