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

Can't install pos-cli on npm > 10.3.0 (POS-101) #626

Closed
z-x opened this issue May 28, 2024 · 4 comments
Closed

Can't install pos-cli on npm > 10.3.0 (POS-101) #626

z-x opened this issue May 28, 2024 · 4 comments
Assignees
Labels

Comments

@z-x
Copy link
Collaborator

z-x commented May 28, 2024

Expected behavior

npm i -g @platformos/pos-cli should install pos-cli without errors.

Actual behavior

Trying to npm i -g @platformos/pos-cli results in an error from node-gyp trying to rebuild fsevents. The problem occurs on npm above 10.3.0. Downgrading npm fixes the problem.

@z-x z-x added the Bug label May 28, 2024
@z-x z-x self-assigned this May 28, 2024
@z-x
Copy link
Collaborator Author

z-x commented May 28, 2024

Related issues:
Node: nodejs/node#52436
Chokidar: paulmillr/chokidar#1319
Fsevents: fsevents/fsevents#378

@z-x
Copy link
Collaborator Author

z-x commented May 28, 2024

From what I've investigated, the failing package is fsevents. It's currently used as a dependency of chokidar, and chokidar is used as a dependency of livereload.

Removing those fixes the installation issue. I've tried to replace chokidar with @parcel/watcher but it does not trigger events on folder operations (parcel-bundler/watcher#165). turbowatch on the other hand is ESM package so we can't use it as we're stuck in CJS.

@z-x z-x changed the title Can't install pos-cli on npm > 10.3.0 Can't install pos-cli on npm > 10.3.0 (POS-101) May 28, 2024
@z-x
Copy link
Collaborator Author

z-x commented Jun 10, 2024

It seems that npm i fsevents@latest -f --save-optional fixes the issue...

@z-x
Copy link
Collaborator Author

z-x commented Jun 11, 2024

Fixed in #627

@z-x z-x closed this as completed Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant