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 via docker or npm - npm ERR! code ELIFECYCLE #210

Closed
kevkid opened this issue Sep 26, 2021 · 12 comments · Fixed by #215
Closed

Can't install via docker or npm - npm ERR! code ELIFECYCLE #210

kevkid opened this issue Sep 26, 2021 · 12 comments · Fixed by #215
Assignees
Labels
bug Something isn't working ms-beta Part of make-sense beta efforts needs-review The problem described requires deeper analysis.

Comments

@kevkid
Copy link

kevkid commented Sep 26, 2021

Describe the bug
Can't install via docker or npm

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/SkalskiP/make-sense.git
  2. cd make-sense
  3. docker build -t make_sense docker/

Expected behavior
For it to build the docker image

Actual behavior

docker build -t make_sense docker/     
Sending build context to Docker daemon  2.048kB
Step 1/5 : FROM node:12.10-slim
 ---> de16f9a8ad0f
Step 2/5 : RUN apt-get update && apt-get -y install git && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> f957e13b68d5
Step 3/5 : RUN mkdir /workspace &&   cd /workspace &&   git clone https://github.com/SkalskiP/make-sense.git &&   cd make-sense &&   npm install
 ---> Running in 628a679ef141
Cloning into 'make-sense'...
Checking out files: 100% (337/337), done.

> @tensorflow/tfjs-node@3.9.0 install /workspace/make-sense/node_modules/@tensorflow/tfjs-node
> node scripts/install.js

CPU-linux-3.9.0.tar.gz
* Downloading libtensorflow
https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.5.0.tar.gz

* Building TensorFlow Node.js bindings
node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! install response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v4/3.9.0/CPU-linux-3.9.0.tar.gz 
node-pre-gyp WARN Pre-built binaries not installable for @tensorflow/tfjs-node@3.9.0 and node@12.10.0 (node-v72 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v4/3.9.0/CPU-linux-3.9.0.tar.gz 
gyp ERR! find Python 
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python 
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python 2.7.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python 
gyp ERR! configure error 
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:303:47)
gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:132:21)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:175:16)
gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:267:16)
gyp ERR! stack     at exithandler (child_process.js:302:5)
gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:314:5)
gyp ERR! stack     at ChildProcess.emit (events.js:209:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! stack     at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Linux 5.8.0-63-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/workspace/make-sense/node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=/workspace/make-sense/node_modules/@tensorflow/tfjs-node/lib/napi-v4" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=4" "--node_napi_label=napi-v4"
gyp ERR! cwd /workspace/make-sense/node_modules/@tensorflow/tfjs-node
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/workspace/make-sense/node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node --module_name=tfjs_binding --module_path=/workspace/make-sense/node_modules/@tensorflow/tfjs-node/lib/napi-v4 --napi_version=4 --node_abi_napi=napi --napi_build_version=4 --node_napi_label=napi-v4' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/workspace/make-sense/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:209:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Linux 5.8.0-63-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/workspace/make-sense/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /workspace/make-sense/node_modules/@tensorflow/tfjs-node
node-pre-gyp ERR! node -v v12.10.0
node-pre-gyp ERR! node-pre-gyp -v v1.0.4
node-pre-gyp ERR! not ok 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/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 WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/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 WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (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 ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@3.9.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @tensorflow/tfjs-node@3.9.0 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-09-26T15_48_00_197Z-debug.log
The command '/bin/sh -c mkdir /workspace &&   cd /workspace &&   git clone https://github.com/SkalskiP/make-sense.git &&   cd make-sense &&   npm install' returned a non-zero code: 1

Similar error occurs when building with npm/nodejs

Ubuntu 20.10
node v12.22.6
npm v6.14.15

@github-actions
Copy link

👋 Hello @kevkid, thank you for your interest in make-sense - free to use online tool for labelling photos! 🏷️

🐞 Bug reports

If you noticed that make-sense is not working properly, please provide us with as much information as possible. To make your life easier, we have prepared a bug report template containing all the relevant details. We know, we ask for a lot... However, please believe that knowing all that extra information - like the type of browser you use or the version of node you have installed - really helps us to solve your problems faster and more efficiently. 😉

💬 Get in touch

If you've been trying to contact us but for some reason we haven't responded to your issue yet, don't hesitate to get back to us on Gitter or Twitter.

💻 Local setup

# clone repository
git clone https://github.com/SkalskiP/make-sense.git

# navigate to main dir
cd make-sense

# install dependencies
npm install

# serve with hot reload at localhost:3000
npm start

To ensure proper functionality of the application locally, an npm 6.x.x and node.js v12.x.x versions are required. More information about this problem is available in the #16 issue.

@iamdman
Copy link

iamdman commented Sep 27, 2021

Describe the bug
Can't install via docker or npm

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/SkalskiP/make-sense.git
  2. cd make-sense
  3. docker build -t make_sense docker/

Expected behavior
For it to build the docker image

Actual behavior

docker build -t make_sense docker/     
Sending build context to Docker daemon  2.048kB
Step 1/5 : FROM node:12.10-slim
 ---> de16f9a8ad0f
Step 2/5 : RUN apt-get update && apt-get -y install git && rm -rf /var/lib/apt/lists/*
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-26T15_48_00_197Z-debug.log
The command '/bin/sh -c mkdir /workspace &&   cd /workspace &&   git clone https://github.com/SkalskiP/make-sense.git &&   cd make-sense &&   npm install' returned a non-zero code: 1

Similar error occurs when building with npm/nodejs

Ubuntu 20.10
node v12.22.6
npm v6.14.15

Yes I am having same error as you @kevkid this pkg does not exist: node-pre-gyp ERR! install response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v4/3.9.0/CPU-linux-3.9.0.tar.gz

@SkalskiP
Copy link
Owner

@kevkid and @iamdman I'll take a look at it today.

@SkalskiP SkalskiP self-assigned this Sep 27, 2021
@SkalskiP SkalskiP added the needs-review The problem described requires deeper analysis. label Sep 27, 2021
@iamdman
Copy link

iamdman commented Sep 28, 2021

Any progress @SkalskiP ?

@kevkid
Copy link
Author

kevkid commented Oct 1, 2021

Any updates @SkalskiP

@hbouy
Copy link

hbouy commented Oct 2, 2021

same issue here! any update?

@HansTierens
Copy link

Updating the node-version in the Dockerfile solved the problem for me:

FROM node:14.18.0
RUN ...

Node 14.18.0 is the current LTS.

@kevkid
Copy link
Author

kevkid commented Oct 6, 2021

Updating the node-version in the Dockerfile solved the problem for me:

FROM node:14.18.0 RUN ...

Node 14.18.0 is the current LTS.

I actually tried this first lol. both 14 and 16, but could not get past that error :(

@scottamain
Copy link
Contributor

Also hit this issue, and updating the node image worked for me. Thanks @HansTierens

@SkalskiP
Copy link
Owner

SkalskiP commented Oct 21, 2021

@HansTierens and @scottamain if I understand correctly updating Dockerfile

FROM node:12.10-slim -> FROM node:14.18.0

Solved that issue? If so then I'll create PR with the fix.

@SkalskiP SkalskiP added bug Something isn't working ms-beta Part of make-sense beta efforts labels Oct 21, 2021
@atilatosta
Copy link

Making the change to FROM node:14.18.0 worked for me

@SkalskiP
Copy link
Owner

Hi all 👋. From your reactions and comments, I conclude that the proposed solution fixes the problem. In this situation, I will make the appropriate changes to the Dockerfile in a moment.

@SkalskiP SkalskiP linked a pull request Nov 12, 2021 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ms-beta Part of make-sense beta efforts needs-review The problem described requires deeper analysis.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants