CircleCI:Node Sass找不到您当前环境的绑定:具有Node.js 10.x的Linux 64位

时间:2019-11-20 16:26:27

标签: angular yarn circleci node-sass

在开始之前,我们将YARN用作程序包管理器,docker和CircleCI。 我在本地从事一个项目,并想将其提交到master分支。在构建工作流程中,发生以下错误。

#!/bin/bash -eo pipefail
echo $SHELL
export NVM_DIR="/opt/circleci/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
yarn run grunt build-wordpress && sudo chown -R circleci:circleci output && yarn run grunt build-wp-extras
/bin/bash
yarn run v1.19.1
$ /home/circleci/tsworkspace/cns/wordpress-multisite-relaunch/node_modules/.bin/grunt build-wordpress
Loading "gruntfile.js" tasks...ERROR
>> Error: Missing binding /home/circleci/tsworkspace/cns/wordpress-multisite-relaunch/node_modules/node-sass/vendor/linux-x64-64/binding.node
>> Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 10.x
>> 
>> Found bindings for the following environments:
>>   - Linux 64-bit with Node.js 12.x
>> 
>> This usually happens because your environment has changed since running `npm install`.
>> Run `npm rebuild node-sass` to download the binding for your current environment.
Warning: Task "build-wordpress" not found. Use --force to continue.

Aborted due to warnings.
error Command failed with exit code 3.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 3

即使在本地强制使用npm重建node-sass也不能解决问题。 Docker有问题吗?解决方案是在为主服务器构建之前重建Node-sass吗? 如果是,我该怎么做。 预先感谢您的回答!

0 个答案:

没有答案