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 launch: Cannot find module 'nopt' #50

Open
Cabu opened this issue Aug 18, 2023 · 6 comments
Open

Can't launch: Cannot find module 'nopt' #50

Cabu opened this issue Aug 18, 2023 · 6 comments

Comments

@Cabu
Copy link

Cabu commented Aug 18, 2023

When starting with:

./b data-snapshot run

I receive the following messages:

Running `yarn install`...
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @silevis/reactgrid@4.0.3" has incorrect peer dependency "react@^16.13.1 || ^17.0.0".
warning " > @silevis/reactgrid@4.0.3" has incorrect peer dependency "react-dom@^16.13.1 || ^17.0.0".
warning " > emoji-mart@3.0.1" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0 || ^17.0.0".
warning " > isomorphic-ws@5.0.0" has unmet peer dependency "ws@*".
warning "next-pwa > babel-loader@8.2.5" has unmet peer dependency "@babel/core@^7.0.0".
warning " > react-json-view@1.21.3" has incorrect peer dependency "react@^17.0.0 || ^16.3.0 || ^15.5.4".
warning " > react-json-view@1.21.3" has incorrect peer dependency "react-dom@^17.0.0 || ^16.3.0 || ^15.5.4".
warning "react-json-view > flux@4.0.3" has incorrect peer dependency "react@^15.0.2 || ^16.0.0 || ^17.0.0".
warning "react-json-view > react-textarea-autosize@8.3.3" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "react-json-view > react-textarea-autosize > use-composed-ref@1.2.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "react-json-view > react-textarea-autosize > use-latest@1.2.0" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning " > react-leaflet-markercluster@4.0.0-rc1" has unmet peer dependency "leaflet.markercluster@^1.5.3".
warning " > stylelint-config-prettier@9.0.5" has incorrect peer dependency "stylelint@>= 11.x < 15".
[4/4] Building fresh packages...
error /home/thierry/biomes-game/node_modules/segfault-handler: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/thierry/biomes-game/node_modules/segfault-handler
Output:
node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module 'nopt'
Require stack:
- /usr/share/nodejs/node-gyp/lib/node-gyp.js
- /usr/share/nodejs/node-gyp/bin/node-gyp.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/usr/share/nodejs/node-gyp/lib/node-gyp.js:4:14)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/share/nodejs/node-gyp/lib/node-gyp.js',
    '/usr/share/nodejs/node-gyp/bin/node-gyp.js'
  ]
}

Node.js v20.5.1
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: There was an error while running `yarn install`.

I tried to install nopt manually without any success :/

@neanderthalbrainman
Copy link

I'm seeing the same issue on Ubuntu Server LTS. Did you have any luck?

@DevinLeamy
Copy link
Contributor

I can't reproduce this locally. Briefly investigating the issue, it looks like manually installing nopt (rather than yarn install nopt) as described here (https://stackoverflow.com/a/76831431) may fix the problem.

If there's any other context that might be useful, please include that too.

@Cabu
Copy link
Author

Cabu commented Aug 22, 2023

I'm seeing the same issue on Ubuntu Server LTS. Did you have any luck?

I am also using Ubuntu LTS :/

@neanderthalbrainman
Copy link

I was able to correct this by reasserting npm use v20 before ./b data-snapshot run
Just guessing that the npm version doesn't persist through logouts so we need to reassert it after install.

Getting a bazel build issue now but going to work through it a bit.

Maybe give that a shot Cabu. Let us know how it goes.

@Cabu
Copy link
Author

Cabu commented Aug 24, 2023

I was able to correct this by reasserting npm use v20 before ./b data-snapshot run Just guessing that the npm version doesn't persist through logouts so we need to reassert it after install.

Getting a bazel build issue now but going to work through it a bit.

Maybe give that a shot Cabu. Let us know how it goes.

No luck :( Still the same error message :(

@DevinLeamy
Copy link
Contributor

@Cabu. Another thing perhaps worth trying is reinstalling the node_modules.
Something like:

rm -rf ./node_modules
yarn install

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

3 participants