Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install latest version on M1 mac with Node 16.16.0 #378

Open
ToughRover opened this issue Jul 14, 2022 · 7 comments
Open

Unable to install latest version on M1 mac with Node 16.16.0 #378

ToughRover opened this issue Jul 14, 2022 · 7 comments

Comments

@ToughRover
Copy link

I am trying to install fsevents@2.3.2 on M1 mac with node 16.16.0, failed with following errors:

zhes-mbp:fseventstest zheshao$ npm i -D fsevents@2.3.2
npm ERR! code 1
npm ERR! path /Users/zheshao/git/dataview-service/fseventstest/node_modules/fsevents
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.16.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.8.9 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/zheshao/.nvm/versions/node/v16.16.0/lib/node_modules/npm/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/zheshao/git/dataview-service/fseventstest/node_modules/fsevents/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/zheshao/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/zheshao/Library/Caches/node-gyp/16.16.0/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/zheshao/Library/Caches/node-gyp/16.16.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/zheshao/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/zheshao/Library/Caches/node-gyp/16.16.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/zheshao/git/dataview-service/fseventstest/node_modules/fsevents',
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: binding.gyp not found (cwd: /Users/zheshao/git/dataview-service/fseventstest/node_modules/fsevents) while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/zheshao/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:261:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command "/Users/zheshao/.nvm/versions/node/v16.16.0/bin/node" "/Users/zheshao/.nvm/versions/node/v16.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/zheshao/git/dataview-service/fseventstest/node_modules/fsevents
npm ERR! gyp ERR! node -v v16.16.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/zheshao/.npm/_logs/2022-07-14T08_23_07_851Z-debug-0.log

Is node 16 supported?

@paulmillr
Copy link
Member

yes

@imt-jaime
Copy link

I can confirm it also happens with NodeJS v18.7.0 and NPM v8.15.1 (Node 18 will be LTS in October).

@imt-jaime
Copy link

Using fsevents@1 instead of version 2 worked for me (Not best solution but temporary).

@lreddickGNA
Copy link

Is there a solution for this other than downgrading the package? I see it in our local builds as well.

@pipobscure
Copy link
Contributor

What specifically are you using fsevents for? If it’s for file watching, then please stop and use the builtin fs.watch which is using fsevents under the hood

@pbgc
Copy link

pbgc commented Feb 2, 2024

This is happening to me with Node v20.10.0 and NPM v.10.4.0

@efstathiosntonas
Copy link

did anyone managed to install v2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants