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

What is the problem? #89

Closed
Kaery40 opened this issue Apr 23, 2021 · 9 comments
Closed

What is the problem? #89

Kaery40 opened this issue Apr 23, 2021 · 9 comments

Comments

@Kaery40
Copy link

Kaery40 commented Apr 23, 2021

internal/modules/cjs/loader.js:984
throw err;
^

Error: Cannot find module 'helmet'
Require stack:

  • C:\Users\Administrator\Desktop\webmc\index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:981:15)
    at Function.Module._load (internal/modules/cjs/loader.js:863:27)
    at Module.require (internal/modules/cjs/loader.js:1043:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object. (C:\Users\Administrator\Desktop\webmc\index.js:3:16)
    at Module._compile (internal/modules/cjs/loader.js:1157:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ 'C:\Users\Administrator\Desktop\webmc\index.js' ]
    }
@Kaery40
Copy link
Author

Kaery40 commented Apr 23, 2021

0 info it worked if it ends with ok
1 verbose cli [ '/opt/node-v14.16.1-linux-x64/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@6.14.12
3 info using node@v14.16.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle web-minecraft@1.0.0prestart: web-minecraft@1.0.0
6 info lifecycle web-minecraft@1.0.0
start: web-minecraft@1.0.0
7 verbose lifecycle web-minecraft@1.0.0start: unsafe-perm in lifecycle true
8 verbose lifecycle web-minecraft@1.0.0
start: PATH: /opt/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/web-minecraft/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
9 verbose lifecycle web-minecraft@1.0.0start: CWD: /opt/web-minecraft
10 silly lifecycle web-minecraft@1.0.0
start: Args: [ '-c', 'npm run prebuild && node index.js' ]
11 silly lifecycle web-minecraft@1.0.0start: Returned: code: 1 signal: null
12 info lifecycle web-minecraft@1.0.0
start: Failed to exec start script
13 verbose stack Error: web-minecraft@1.0.0 start: npm run prebuild && node index.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/opt/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (/opt/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid web-minecraft@1.0.0
15 verbose cwd /opt/web-minecraft
16 verbose Linux 4.18.0-240.15.1.el8_3.x86_64
17 verbose argv "/opt/node-v14.16.1-linux-x64/bin/node" "/usr/bin/npm" "start"
18 verbose node v14.16.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error web-minecraft@1.0.0 start: npm run prebuild && node index.js
22 error Exit status 1
23 error Failed at the web-minecraft@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@michaljaz
Copy link
Owner

didn't you forgot npm install

@Kaery40
Copy link
Author

Kaery40 commented Apr 23, 2021

[root@sucloud ~]# npm -v
6.14.12
[root@sucloud ~]# node -v
v14.16.1

@Kaery40
Copy link
Author

Kaery40 commented Apr 23, 2021

This is what I did wrong with NPM install.

@Kaery40
Copy link
Author

Kaery40 commented Apr 23, 2021

[root@sucloud web-minecraft]# npm install

lzma-native@4.0.6 install /opt/web-minecraft/node_modules/lzma-native
node-pre-gyp install --fallback-to-build && rimraf build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for lzma-native@4.0.6 and node@14.16.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/opt/web-minecraft/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64'
gyp WARN EACCES current user does not have permission to access the dev dir "/root/.cache/node-gyp/14.16.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/opt/web-minecraft/node_modules/lzma-native/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/web-minecraft/node_modules/lzma-native/.node-gyp'
gyp ERR! System Linux 4.18.0-240.15.1.el8_3.x86_64
gyp ERR! command "/opt/node-v14.16.1-linux-x64/bin/node" "/opt/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/web-minecraft/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/opt/web-minecraft/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /opt/web-minecraft/node_modules/lzma-native
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/opt/node-v14.16.1-linux-x64/bin/node /opt/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/web-minecraft/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/opt/web-minecraft/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess. (/opt/web-minecraft/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 4.18.0-240.15.1.el8_3.x86_64
node-pre-gyp ERR! command "/opt/node-v14.16.1-linux-x64/bin/node" "/opt/web-minecraft/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /opt/web-minecraft/node_modules/lzma-native
node-pre-gyp ERR! node -v v14.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/opt/node-v14.16.1-linux-x64/bin/node /opt/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/web-minecraft/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/opt/web-minecraft/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lzma-native@4.0.6 install: node-pre-gyp install --fallback-to-build && rimraf build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lzma-native@4.0.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-04-23T10_01_45_052Z-debug.log

@michaljaz
Copy link
Owner

why you are doing this in /opt/ folder?

@michaljaz
Copy link
Owner

maybe it has wrong permissions

@SickProdigy
Copy link

SickProdigy commented Apr 16, 2022

Hello, am getting something similar trying to run npm install.

lzma-native@4.0.6 install /home/minecraft/webmc/webmc-master/node_modules/lzma-native
> node-pre-gyp install --fallback-to-build && rimraf build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-pre-gyp.addaleax.net/lzma-native/lzma_native-v4.0.6-node-v83-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for lzma-native@4.0.6 and node@14.19.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
gyp: Call to 'sh liblzma-config.sh "/home/minecraft/webmc/webmc-master/node_modules/lzma-native/build" "/home/minecraft/webmc/webmc-master/node_modules/lzma-native/deps/xz-5.2.3.tar.bz2"' returned exit status 2 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/minecraft/.nvm/versions/node/v14.19.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Linux 5.10.0-13-cloud-amd64
gyp ERR! command "/home/minecraft/.nvm/versions/node/v14.19.1/bin/node" "/home/minecraft/.nvm/versions/node/v14.19.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/minecraft/webmc/webmc-master/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64/lzma_native.node" "--module_name=lzma_native" "--module_path=/home/minecraft/webmc/webmc-master/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /home/minecraft/webmc/webmc-master/node_modules/lzma-native
gyp ERR! node -v v14.19.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/minecraft/.nvm/versions/node/v14.19.1/bin/node /home/minecraft/.nvm/versions/node/v14.19.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/minecraft/webmc/webmc-master/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/home/minecraft/webmc/webmc-master/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/minecraft/webmc/webmc-master/node_modules/lzma-native/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1058:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
node-pre-gyp ERR! System Linux 5.10.0-13-cloud-amd64
node-pre-gyp ERR! command "/home/minecraft/.nvm/versions/node/v14.19.1/bin/node" "/home/minecraft/webmc/webmc-master/node_modules/lzma-native/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/minecraft/webmc/webmc-master/node_modules/lzma-native
node-pre-gyp ERR! node -v v14.19.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/home/minecraft/.nvm/versions/node/v14.19.1/bin/node /home/minecraft/.nvm/versions/node/v14.19.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/minecraft/webmc/webmc-master/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64/lzma_native.node --module_name=lzma_native --module_path=/home/minecraft/webmc/webmc-master/node_modules/lzma-native/binding-v4.0.6-node-v83-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/sass/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lzma-native@4.0.6 install: `node-pre-gyp install --fallback-to-build && rimraf build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lzma-native@4.0.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/minecraft/.npm/_logs/2022-04-16T22_06_23_293Z-debug.log

@dfmjndm
Copy link

dfmjndm commented Apr 29, 2022

I am getting something similar trying to run "npm install" in centos8.
when useing docker,it failed again.
But on the win10 system, I succeeded.
Could I wait for a docker file on dockerhub?
thank you for your work.

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

4 participants