Builds failing because they started using npm instead of yarn

Amazing thanks a ton !
Sorry I didn’t spot the error earlier in the logs :slight_smile:

We don’t have this exact error you have quoted in your post, but it also fails on our end because it also ignores yarn in our build and always uses npm. It would be great to have this bugfix very fast, since we are depending on those builds today!

I am seeing yarn projects suddenly using npm too. The only noticeable difference in logs since it stopped working seems to be a new buildbot version hash.

same here, all my builds are failing because of that

We are seeing our builds failing as well. This started happening from yesterday. The builds were working fine till yesterday. But today all the builds failed. It is trying to use npm instead of yarn.

I am seeing this exact issue happening across multiple unrelated projects. It started some time within the last three hours. Please roll back whatever is causing the build to use npm instead of yarn, we have urgent updates waiting to go live. We have both a yarn.lock file and I just set NETLIFY_USE_YARN = true in addition to that, but it’s not having an effect.

same here. This is our logs. Looks like framework detection failing and NETLIFY_USE_YARN no effect. Only happens with newly created site. Unfortunately we need to launch this now.

1:39:18 PM: git clone
1:39:19 PM: Preparing Git Reference refs/heads/rococo
1:39:19 PM: Parsing package.json dependencies
1:39:20 PM: Section completed: initializing
1:39:21 PM: Failed to get framework information, continuing with build
1:39:21 PM: Starting build script
1:39:21 PM: Installing dependencies
1:39:21 PM: Python version set to 2.7
1:39:21 PM: v16.18.1 is already installed.
1:39:21 PM: Now using node v16.18.1 (npm v8.19.2)
1:39:21 PM: Enabling node corepack
1:39:21 PM: Started restoring cached build plugins
1:39:21 PM: Finished restoring cached build plugins
1:39:22 PM: Attempting ruby version 2.7.2, read from environment
1:39:22 PM: Using ruby version 2.7.2
1:39:22 PM: Using PHP version 8.0
1:39:22 PM: No npm workspaces detected
1:39:22 PM: Started restoring cached node modules
1:39:22 PM: Finished restoring cached node modules
1:39:23 PM: Installing NPM modules using NPM version 8.19.2
1:39:23 PM: npm ERR! Unsupported URL Type "link:": link:./src/jsx
1:39:23 PM: npm ERR! A complete log of this run can be found in:
1:39:23 PM: Creating deploy upload records
1:39:23 PM: npm ERR!     /opt/buildhome/.npm/_logs/2022-12-06T12_39_23_336Z-debug-0.log
1:39:23 PM: Error during NPM install
1:39:23 PM: Build was terminated: Build script returned non-zero exit code: 1

Same here. Started to get this error like one hour ago.

In the logs its saying:
Failed to get framework information, continuing with build

Then its using npm instead of yarn and it crashes with:
bash: yarn: command not found

Using NETLIFY_USE_YARN didnt help.

Can we get an update on this please? its evident that hundreds of people are having issues with this change which as far as i am aware was done without notification. I like many have important builds that are now failing due to the switch…

1 Like

I’m also facing this error from yesterday and almost tried every solution but didn’t work. Please give us update on this. Our important project builds are failing because of this

As a hack I’ve replaced my yarn build commands for npm run build, otherwise all my builds are broken

Ditto, all my sites are also failing to build with the same error:

Error during NPM install
Build was terminated: Build script returned non-zero exit code: 1
Failing build: Failed to build site

NETLIFY_USE_YARN also had no effect for us.

Are we supposed to change our projects from yarn to npm? We really don’t want to have to do this, as it will take ages to go through each of our sites and make the change

Have the same issue
Started like a few hours ago

Sorry folks for the inconveniences that we caused here. We are trying hard to push this as fast as possible out.


Luckily we were in a position where we didn’t have any critical builds we needed to make today when this issue appeared.

I just wanted to say that I think it’s a bit of a joke that this issue is even a thing. There shouldn’t be any situation here where such a critical issue like this is allowed to happen. This issue broke many people’s builds, with no reasonable workarounds (what’s the point in all these environment variables related to yarn if you can’t even force it to use it?), especially when nearly the same issue happened 18d ago!

I’m going to have to seriously consider whether it’s worth using netlify for future projects (or even existing ones) when game-breaking issues like this are allowed to make it through to everyone multiple times


@PastaJ36 is right. Issues are increasing more and more and with all those competitors on the market I really hope the quality comes back, otherwise I see there will be more people like him.

has this been fixed? builds still failing for the same reason on my end.

no framework detection + tries to use npm instead of yarn

There is a release now chore: release main by netlify-jenkins · Pull Request #4749 · netlify/build · GitHub, but it is still broken on my end…

sadly my company has started to migrate to Vercel all because of these things (+ pricing changes + lack of maintenance to Netlify CMS)

I can imagine that. Lack of quality + pricing changes also convinced my company to change to Gatsby Cloud instead.