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

ERROR [5/5] RUN npm install, node-sass cannot download, get's a 404 #110

Open
kartzke opened this issue Jul 31, 2021 · 4 comments
Open

ERROR [5/5] RUN npm install, node-sass cannot download, get's a 404 #110

kartzke opened this issue Jul 31, 2021 · 4 comments

Comments

@kartzke
Copy link

kartzke commented Jul 31, 2021

Hi, I was trying to run wagtail-bootstrap-blog on my local, but I'm getting the following error. Seems to be an issue when downloading node-sass. I checked the request URL and it does indeed 404.

I'm not sure how to fix this. Looking at the available releases for v5, I don't see an arm64 version: https://github.com/sass/node-sass/releases/

Any suggestions?

 => ERROR [5/5] RUN npm install                                                                                                                                        15.0s
------                                                                                                                                                                       
 > [5/5] RUN npm install:                                                                                                                                                    
#9 10.70                                                                                                                                                                     
#9 10.70 > [email protected] install /app/frontend/node_modules/node-sass                                                                                                      
#9 10.70 > node scripts/install.js                                                                                                                                           
#9 10.70                                                                                                                                                                     
#9 10.88 Downloading binary from https://github.com/sass/node-sass/releases/download/v5.0.0/linux-arm64-72_binding.node
#9 13.36 Cannot download "https://github.com/sass/node-sass/releases/download/v5.0.0/linux-arm64-72_binding.node": 
#9 13.36 
#9 13.36 HTTP error 404 Not Found
#9 13.36 
#9 13.36 Hint: If github.com is not accessible in your location
#9 13.36       try setting a proxy via HTTP_PROXY, e.g. 
#9 13.36 
#9 13.36       export HTTP_PROXY=http://example.com:1234
#9 13.36 
#9 13.36 or configure npm proxy via
#9 13.36 
#9 13.36       npm config set proxy http://example.com:8080
#9 13.40 
#9 13.40 > [email protected] postinstall /app/frontend/node_modules/@babel/polyfill/node_modules/core-js
#9 13.40 > node -e "try{require('./postinstall')}catch(e){}"
#9 13.40 
#9 13.43 Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
#9 13.43 
#9 13.43 The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
#9 13.43 > https://opencollective.com/core-js 
#9 13.43 > https://www.patreon.com/zloirock 
#9 13.43 
#9 13.43 Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
#9 13.43 
#9 13.55 
#9 13.55 > [email protected] postinstall /app/frontend/node_modules/core-js
#9 13.55 > node -e "try{require('./postinstall')}catch(e){}"
#9 13.55 
#9 13.58 Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
#9 13.58 
#9 13.58 The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
#9 13.58 > https://opencollective.com/core-js 
#9 13.58 > https://www.patreon.com/zloirock 
#9 13.58 
#9 13.58 Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
#9 13.58 
#9 13.58 
#9 13.58 > [email protected] postinstall /app/frontend/node_modules/node-sass
#9 13.58 > node scripts/build.js
#9 13.58 
#9 13.65 Building: /usr/local/bin/node /app/frontend/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
#9 13.68 gyp info it worked if it ends with ok
#9 13.68 gyp verb cli [
#9 13.68 gyp verb cli   '/usr/local/bin/node',
#9 13.68 gyp verb cli   '/app/frontend/node_modules/node-gyp/bin/node-gyp.js',
#9 13.68 gyp verb cli   'rebuild',
#9 13.68 gyp verb cli   '--verbose',
#9 13.68 gyp verb cli   '--libsass_ext=',
#9 13.68 gyp verb cli   '--libsass_cflags=',
#9 13.68 gyp verb cli   '--libsass_ldflags=',
#9 13.68 gyp verb cli   '--libsass_library='
#9 13.68 gyp verb cli ]
#9 13.68 gyp info using [email protected]
#9 13.68 gyp info using [email protected] | linux | arm64
#9 13.68 gyp verb command rebuild []
#9 13.68 gyp verb command clean []
#9 13.69 gyp verb clean removing "build" directory
#9 13.69 gyp verb command configure []
#9 13.70 gyp verb find Python Python is not set from command line or npm configuration
#9 13.70 gyp verb find Python Python is not set from environment variable PYTHON
#9 13.70 gyp verb find Python checking if "python3" can be used
#9 13.70 gyp verb find Python - executing "python3" to get executable path
#9 13.70 gyp verb find Python - "python3" is not in PATH or produced an error
#9 13.70 gyp verb find Python checking if "python" can be used
#9 13.70 gyp verb find Python - executing "python" to get executable path
#9 13.71 gyp verb find Python - "python" is not in PATH or produced an error
#9 13.71 gyp verb find Python checking if "python2" can be used
#9 13.71 gyp verb find Python - executing "python2" to get executable path
#9 13.71 gyp verb find Python - "python2" is not in PATH or produced an error
#9 13.71 gyp ERR! find Python 
#9 13.71 gyp ERR! find Python Python is not set from command line or npm configuration
#9 13.71 gyp ERR! find Python Python is not set from environment variable PYTHON
#9 13.71 gyp ERR! find Python checking if "python3" can be used
#9 13.71 gyp ERR! find Python - "python3" is not in PATH or produced an error
#9 13.71 gyp ERR! find Python checking if "python" can be used
#9 13.71 gyp ERR! find Python - "python" is not in PATH or produced an error
#9 13.71 gyp ERR! find Python checking if "python2" can be used
#9 13.71 gyp ERR! find Python - "python2" is not in PATH or produced an error
#9 13.71 gyp ERR! find Python 
#9 13.71 gyp ERR! find Python **********************************************************
#9 13.71 gyp ERR! find Python You need to install the latest version of Python.
#9 13.71 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#9 13.71 gyp ERR! find Python you can try one of the following options:
#9 13.71 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#9 13.71 gyp ERR! find Python   (accepted by both node-gyp and npm)
#9 13.71 gyp ERR! find Python - Set the environment variable PYTHON
#9 13.71 gyp ERR! find Python - Set the npm configuration variable python:
#9 13.71 gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#9 13.71 gyp ERR! find Python For more information consult the documentation at:
#9 13.71 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#9 13.71 gyp ERR! find Python **********************************************************
#9 13.71 gyp ERR! find Python 
#9 13.71 gyp ERR! configure error 
#9 13.71 gyp ERR! stack Error: Could not find any Python installation to use
#9 13.71 gyp ERR! stack     at PythonFinder.fail (/app/frontend/node_modules/node-gyp/lib/find-python.js:302:47)
#9 13.71 gyp ERR! stack     at PythonFinder.runChecks (/app/frontend/node_modules/node-gyp/lib/find-python.js:136:21)
#9 13.71 gyp ERR! stack     at PythonFinder.<anonymous> (/app/frontend/node_modules/node-gyp/lib/find-python.js:179:16)
#9 13.71 gyp ERR! stack     at PythonFinder.execFileCallback (/app/frontend/node_modules/node-gyp/lib/find-python.js:266:16)
#9 13.71 gyp ERR! stack     at exithandler (child_process.js:315:5)
#9 13.71 gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:327:5)
#9 13.71 gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
#9 13.71 gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
#9 13.71 gyp ERR! stack     at onErrorNT (internal/child_process.js:470:16)
#9 13.71 gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
#9 13.71 gyp ERR! System Linux 5.10.25-linuxkit
#9 13.71 gyp ERR! command "/usr/local/bin/node" "/app/frontend/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
#9 13.71 gyp ERR! cwd /app/frontend/node_modules/node-sass
#9 13.71 gyp ERR! node -v v12.22.4
#9 13.71 gyp ERR! node-gyp -v v7.1.2
#9 13.71 gyp ERR! not ok 
#9 13.71 Build failed with error code: 1
#9 13.97 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
#9 13.97 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
#9 13.97 
#9 14.04 npm ERR! code ELIFECYCLE
#9 14.04 npm ERR! errno 1
#9 14.04 npm ERR! [email protected] postinstall: `node scripts/build.js`
#9 14.04 npm ERR! Exit status 1
#9 14.04 npm ERR! 
#9 14.04 npm ERR! Failed at the [email protected] postinstall script.
#9 14.04 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#9 14.12 
#9 14.12 npm ERR! A complete log of this run can be found in:
#9 14.12 npm ERR!     /root/.npm/_logs/2021-07-31T02_43_41_517Z-debug.log
------
executor failed running [/bin/sh -c npm install]: exit code: 1
ERROR: Service 'frontend' failed to build : Build failed
@michael-yin
Copy link
Member

@kartzke

I guess you need to check https://github.com/sass/node-sass#node-version-support-policy

Thx

@kartzke
Copy link
Author

kartzke commented Jul 31, 2021

@michael-yin thanks... I don't know much about node, but the script is installing node-sass in the docker container, correct? I'm not exactly sure how the docker build is selecting that version. Searching through the wagtail-bootstrap-blog code, I only see "node-sass": "^5.0.0" in the package.json file. How does the package determine this URL is the right version? https://github.com/sass/node-sass/releases/download/v5.0.0/linux-arm64-72_binding.node

@michael-yin
Copy link
Member

@kartzke

Do you see this error when running with docker-compose build or local npm install command?

You can see node version with node -v command.

If the error display with docker-compose build, I will later check it.

Thx.

@kartzke
Copy link
Author

kartzke commented Jul 31, 2021

Yes, I get this when I run docker-compose up --build, I was just following the instructions in the readme.

On my local, node version == v16.6.0. But that wouldn't be used in the docker build, right?

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

2 participants