Troubles with node-gyp

270 Views Asked by At

I have trouble compiling node-gyp My mac is a M1 mac with node installed via brew and also python via brew

This is the output of the compiling test:

 [email protected] install /Users/myuser/myuserdirectoryproject/core-services/node_modules/node-expat
> node-gyp rebuild

  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlparse.o
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmltok.o
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlrole.o
  LIBTOOL-STATIC Release/libexpat.a
env: python: No such file or directory
make: *** [Release/libexpat.a] Error 127
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/myuser/.nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 22.6.0
gyp ERR! command "/Users/myuser/.nvm/versions/node/v14.16.0/bin/node" "/Users/myuser/.nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/myuser/myuserdirectoryproject/core-services/node_modules/node-expat
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN [email protected] requires a peer of eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Can you help me? Thanks in advance

I tried downgrading to python3.10 but with not luck.

0

There are 0 best solutions below