build-image
build-image copied to clipboard
Builds fail when using `[email protected]`
Describe the bug
Builds are working using [email protected]
, but when attempting to upgrade to [email protected]
builds begin to fail. The logs state it installs [email protected]
for some reason, I'm not sure why. There is no config present on our site stating to use [email protected]
To Reproduce
Steps to reproduce the behavior:
- https://github.com/carbon-design-system/carbon/pull/12266
- https://app.netlify.com/sites/carbon-components-react/deploys/634367e85842f7000835c096
- https://app.netlify.com/sites/carbon-elements/deploys/634367e84ca6fb0008ead4e2
Configuration
[build.environment]
YARN_FLAGS = "--immutable"
Expected behavior
Builds should succeed when using [email protected]
Build Output
I am unsure why these logs state Cannot find module '/opt/build/repo/.yarn/releases/yarn-3.2.1.cjs
, everything configured in the PR has updated yarn to 3.2.4
.
7:32:16 PM: > Successfully installed Yarn 1.13.0! Please open another terminal where the `yarn` command will now be available.
7:32:16 PM: yarn workspaces detected
7:32:16 PM: node:internal/modules/cjs/loader:959
7:32:16 PM: throw err;
7:32:16 PM: ^
7:32:16 PM: Error: Cannot find module '/opt/build/repo/.yarn/releases/yarn-3.2.1.cjs'
7:32:16 PM: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
7:32:16 PM: at Function.Module._load (node:internal/modules/cjs/loader:804:27)
7:32:16 PM: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
7:32:16 PM: at node:internal/main/run_main_module:17:47 {
7:32:16 PM: code: 'MODULE_NOT_FOUND',
7:32:16 PM: requireStack: []
7:32:16 PM: }
7:32:16 PM: Installing NPM modules using Yarn version
7:32:17 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
7:32:17 PM: npm WARN config location in the cache, and they are managed by
7:32:17 PM: npm WARN config [`cacache`](http://npm.im/cacache).
7:32:17 PM: node:internal/modules/cjs/loader:959
7:32:17 PM: throw err;
7:32:17 PM: ^
7:32:17 PM: Error: Cannot find module '/opt/build/repo/.yarn/releases/yarn-3.2.1.cjs'
7:32:17 PM: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
7:32:17 PM: at Function.Module._load (node:internal/modules/cjs/loader:804:27)
7:32:17 PM: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
7:32:17 PM: at node:internal/main/run_main_module:17:47 {
7:32:17 PM: code: 'MODULE_NOT_FOUND',
7:32:17 PM: requireStack: []
7:32:17 PM: }
7:32:17 PM: Error during Yarn install
7:32:17 PM: Build was terminated: Build script returned non-zero exit code: 1
@tay1orjones currently we dont support yarn berry (so just Version 1) But we are currently working on it to get it working. Sorry for the inconvenience, maybe you can work with version 1 for now.
Related with https://github.com/netlify/build-image/issues/779
@tay1orjones does it work now for you or still fail?
@lukasholzer Yep, we can close this one out. In our PR updating the version I missed updating the .yarnrc
🤦
So the full list of where the version needs to be specified to get this working is:
-
.yarnrc
-
.yarnrc.yml
-
package.json
Glad this is resolved 🥳