简体   繁体   English

npm install node-sass@latest not installed with error: 无法下载“v5.0.0/linux_musl-x64-57_binding.node”:

[英]npm install node-sass@latest not installed with error : Cannot download “v5.0.0/linux_musl-x64-57_binding.node”:

In my docker file, I tried to create an image.在我的 docker 文件中,我尝试创建一个图像。 Here is my Dockerfile:这是我的 Dockerfile:

FROM node:8.10.0-alpine
WORKDIR /


ENV GLIBC_VERSION=2.32-r0
ENV JAVA_HOME=/opt/jdk1.8.0_211
ENV JRE_HOME=/opt/jdk1.8.0_211/jre
ENV JAVA_OPTS="-Dfile.encoding=UTF-8"
ENV PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$JAVA_OPTS:$PATH
ENV NPM_GLOBAL /.npm-global
ENV PATH ${NPM_GLOBAL}/bin:$PATH



RUN apk add --update \
      ca-certificates \
      wget \
      curl \
      git \
      openssh \
      bash && \
    # Install latest glibc
    wget --directory-prefix=/tmp https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk && \
    apk add --allow-untrusted /tmp/glibc-${GLIBC_VERSION}.apk && \
    wget --directory-prefix=/tmp https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk && \
    apk add --allow-untrusted /tmp/glibc-bin-${GLIBC_VERSION}.apk && \
    wget --directory-prefix=/tmp https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-i18n-${GLIBC_VERSION}.apk && \
    apk --allow-untrusted add /tmp/glibc-i18n-${GLIBC_VERSION}.apk && \
    /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 && \


    
  ...
 
RUN npm cache clear --force
RUN npm install --global yo gulp
RUN npm install --global gulp-cli
RUN npm install --save-dev gulp
RUN npm i --save gulp-ruby-sass
RUN npm install node-sass@latest

RUN npm update
RUN npm rebuild node-sass

The saas installation blocked while trying to download: Downloading binary from https://github.com/sass/node-sass/releases/download/v5.0.0/linux_musl-x64-57_binding.node [91mCannot download "https://github.com/sass/node-sass/releases/download/v5.0.0/linux_musl-x64-57_binding.node":尝试下载时 saas 安装被阻止:Downloading binary from https://github.com/sass/node-sass/releases/download/v5.0.0/linux_musl-x64-57_binding.node [91mCannot download "https://github .com/sass/node-sass/releases/download/v5.0.0/linux_musl-x64-57_binding.node”:

Which is not available anymore.哪个不再可用。 Look here: https://github.com/sass/node-sass/releases看这里: https://github.com/sass/node-sass/releases

Here is the output:这是 output:

Step 19/25 : RUN npm install node-sass@latest
 ---> Running in aff763880e27
[91mnpm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
[0m[91mnpm WARN deprecated har-validator@5.1.5: this library is no longer supported
[0m
> node-sass@5.0.0 install /node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v5.0.0/linux_musl-x64-57_binding.node
[91mCannot download "https://github.com/sass/node-sass/releases/download/v5.0.0/linux_musl-x64-57_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080
[0m
> node-sass@5.0.0 postinstall /node_modules/node-sass
> node scripts/build.js

Building: /usr/local/bin/node /node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
[91mgyp[0m[91m info it worked if it ends with ok
[0m[91mgyp verb cli [ '/usr/local/bin/node',
[0m[91mgyp verb cli   '/node_modules/node-gyp/bin/node-gyp.js',
gyp [0m[91mverb [0m[91mcli   'rebuild',
gyp verb cli[0m[91m   '--verbose',
[0m[91mgyp verb cli[0m[91m   '--libsass_ext=',
[0m[91mgyp verb cli   '--libsass_cflags=',
gyp verb[0m[91m cli   '--libsass_ldflags=',
gyp[0m[91m verb cli[0m[91m   '--libsass_library=' ]
[0m[91mgyp info using node-gyp@7.1.2
[0m[91mgyp [0m[91minfo using[0m[91m node@8.10.0 | linux | x64
[0m[91mgyp verb command rebuild []
[0m[91mgyp verb command clean []
[0m[91mgyp verb clean removing "build" directory
[0m[91mgyp verb command configure []
[0m[91mgyp verb find Python Python is not set from command line or npm configuration
[0m[91mgyp verb [0m[91mfind Python Python is not set from environment variable PYTHON
[0m[91mgyp verb [0m[91mfind Python checking if "python3" can be used
[0m[91mgyp verb find Python - executing "python3" to get executable path
[0m[91mgyp verb find Python - "python3" is not in PATH or produced an error
gyp [0m[91mverb find Python checking if "python" can be used
gyp verb find Python[0m[91m - executing "python" to get executable path
[0m[91mgyp verb find Python - "python" is not in PATH or produced an error
[0m[91mgyp verb find Python checking if "python2" can be used
gyp verb[0m[91m find Python - executing "python2" to get executable path
[0m[91mgyp verb find Python - "python2" is not in PATH or produced an error
[0m[91mgyp ERR! find Python 
gyp [0m[91mERR! find Python Python is not set from command line or npm configuration
gyp [0m[91mERR![0m[91m find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp[0m[91m ERR! find Python - "python3" is not in PATH or produced an error
gyp[0m[91m [0m[91mERR! [0m[91mfind Python checking if "python" can be used
[0m[91mgyp ERR![0m[91m find Python - "python" is not in PATH or produced an error
[0m[91mgyp [0m[91mERR! find Python checking if "python2" can be used
gyp ERR![0m[91m [0m[91mfind Python - "python2" is not in PATH or produced an error
[0m[91mgyp[0m[91m ERR![0m[91m find Python 
[0m[91mgyp ERR![0m[91m find Python[0m[91m **********************************************************
gyp ERR! [0m[91mfind Python You need to install the latest version of Python.
[0m[91mgyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp[0m[91m ERR! find Python[0m[91m you can try one of the following options:
gyp ERR![0m[91m find Python - Use the switch --python="/path/to/pythonexecutable"
[0m[91mgyp ERR![0m[91m find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! [0m[91mfind Python - Set the npm configuration variable python:
gyp[0m[91m ERR! [0m[91mfind Python   npm config set python "/path/to/pythonexecutable"
gyp ERR![0m[91m find Python[0m[91m For more information consult the documentation at:
gyp ERR![0m[91m find Python https://github.com/nodejs/node-gyp#installation
gyp[0m[91m ERR! find Python[0m[91m **********************************************************
gyp ERR! find Python[0m[91m 
[0m[91mgyp ERR! configure error 
[0m[91mgyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (/node_modules/node-gyp/lib/find-python.js:302:47)
[0m[91mgyp ERR! [0m[91mstack     at PythonFinder.runChecks (/node_modules/node-gyp/lib/find-python.js:136:21)
gyp [0m[91mERR! stack     at PythonFinder.<anonymous> (/node_modules/node-gyp/lib/find-python.js:179:16)
[0m[91mgyp [0m[91mERR! [0m[91mstack     at PythonFinder.execFileCallback (/node_modules/node-gyp/lib/find-python.js:266:16)
[0m[91mgyp [0m[91mERR! [0m[91mstack     at exithandler (child_process.js:282:5)
[0m[91mgyp ERR! stack     at ChildProcess.errorhandler (child_process.js:294:5)
[0m[91mgyp ERR![0m[91m stack     at emitOne (events.js:116:13)
[0m[91mgyp ERR! stack     at ChildProcess.emit (events.js:211:7)
gyp[0m[91m ERR! [0m[91mstack     at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
[0m[91mgyp ERR![0m[91m stack     at onErrorNT (internal/child_process.js:372:16)
[0m[91mgyp ERR! [0m[91mSystem Linux 4.15.0-1087-gcp
[0m[91mgyp ERR! command "/usr/local/bin/node" "/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
[0m[91mgyp ERR! [0m[91mcwd[0m[91m /node_modules/node-sass
[0m[91mgyp ERR! node -v v8.10.0
[0m[91mgyp ERR! [0m[91mnode-gyp -v v7.1.2
[0m[91mgyp ERR! not ok 
[0m[91mBuild failed with error code: 1
[0m[91mnpm WARN enoent ENOENT: no such file or directory, open '/package.json'
[0m[91mnpm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN[0m[91m !invalid#1 No README data
npm WARN !invalid#1 No license field.
[0m[91mnpm 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"})
[0m[91m
[0m[91mnpm ERR! code ELIFECYCLE
[0m[91mnpm ERR! errno 1
[0m[91mnpm ERR! node-sass@5.0.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR![0m[91m 
npm ERR! Failed at the node-sass@5.0.0 postinstall script.
npm[0m[91m ERR! This is probably not a problem with npm. There is likely additional logging output above.
[0m[91m
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-02-19T13_12_12_157Z-debug.log
[0mThe command '/bin/sh -c npm install node-sass@latest' returned a non-zero code: 1
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Push Image)
Stage "Push Image" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE

How can I specify this step?如何指定此步骤?

RUN npm install node-sass@latest运行 npm 安装 node-sass@latest

Thanks in advance.提前致谢。

node-sass v5 no longer supports Node 8, as it is EOL https://github.com/sass/node-sass#node-version-support-policy node-sass v5 不再支持 Node 8,因为它是 EOL https://github.com/sass/node-sass#node-version-support-policy

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Docker:节点 Sass 找不到当前环境的绑定:Linux/musl 64-bit with Node.js 10.x - Docker: Node Sass could not find a binding for your current environment: Linux/musl 64-bit with Node.js 10.x 预期目录:node-v83-linux-x64-musl。 找到:[node-v72-linux-x64-musl] - Expected directory: node-v83-linux-x64-musl. Found: [node-v72-linux-x64-musl] NPM安装问题无法下载win32-x64-83_binding.node - NPM install problem cannot download win32-x64-83_binding.node webpack构建时缺少绑定/myproject/node_modules/node-sass/vendor/linux-x64-57/binding.node - Missing binding /myproject/node_modules/node-sass/vendor/linux-x64-57/binding.node while webpack build Azure Pipelines:无法下载“https://github.com/sass/node-sass/releases/download/v4.13.0/win32-x64-83_binding.node” - Azure Pipelines: Cannot download "https://github.com/sass/node-sass/releases/download/v4.13.0/win32-x64-83_binding.node" node-v57-linux-x64/grpc_node.node 丢失 - node-v57-linux-x64/grpc_node.node missing 无法使用 NPM 安装节点 Sass - Cannot Install Node Sass with NPM 错误:节点 Sass 版本 5.0.0 与 ^4.0.0 不兼容(使用此命令后:“npm install node-sass@4.14.1”仍然抛出相同的错误 - Error: Node Sass version 5.0.0 is incompatible with ^4.0.0 (After using this command : “npm install node-sass@4.14.1” still throws a same error 错误:找不到模块&#39;... / node_modules / sqlite3 / lib / binding / node-v14-linux-x64 / node_sqlite3.node&#39; - ERROR: Cannot find module '…/node_modules/sqlite3/lib/binding/node-v14-linux-x64/node_sqlite3.node' 在 linux 上使用 clasp 时缺少 node-v57-linux-x64-glibc/grpc_node.node - node-v57-linux-x64-glibc/grpc_node.node missing when using clasp on linux
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM