【发布时间】:2021-07-21 17:37:12
【问题描述】:
我在 gitlab 中的.yml 文件是这样的
stages:
- prepare_build
- save_build
- deployment
image: node:latest
cache:
paths:
- node_modules/
prepare_build:
stage: prepare_build
script:
- npm install
- npm run build
artifacts:
paths:
- build
下面是我的package.json 文件,其中包含node-sass 和sass-loader
"node-sass": "^4.14.1",
"sass-loader": "^7.0.1",
我的本地机器,构建成功,它有 node 和 npm 版本
node : 14.5.0
npm : 6.14.8
下面是我的 GitLab 构建错误
npm ERR! code 1
npm ERR! path /builds/../../node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /builds./../.././node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
我必须在package.json 中更新哪些版本组合? TIA
【问题讨论】:
-
是的,你必须将版本组合放在 package.json 中
-
@GopalJoshi 最新节点的组合是什么?
标签: node.js npm gitlab package.json node-sass