#Found lockfile missing swc dependencies, patching...

12 messages · Page 1 of 1 (latest)

graceful cove
#

I'm having an issue where I constantly have package-lock.json diffs pop up when running our company's next server. When running the server I get a warning in the console:

warn  - Found lockfile missing swc dependencies, patching...

warn  - Lockfile was successfully patched, please run "npm install" to ensure @next/swc dependencies are downloaded

This isn't happening to anyone else on my team. I believe it started happening when we upgraded from Node 16 to 20 recently. The entire company uses Macbook Pro machines, but probably all slightly different year models.

I've tried deleting package-lock.json and node_modules and rerunning npm i - even tried a cache clean in between, several times. I've also tried nuking the repo entirely and recloning. Nothing seems to fix the issue. I'm attaching screenshots of the diffs. The first four are in the middle of the lockfile, the last two are at the bottom.

warm doveBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

graceful cove
#

Bump

simple talon
#

heya is the server behaving weirdly or is it just a warning that doesn't actually affect anything?

#

from what I could tell since everyone in the company uses MacBook it might be that the package-lock.json only contained an arm64 swc binary since that's what's only needed for it to be able to run on an apple silicon chips (and seeing from your screenshots, there's no @next/swc-darwin-arm64 that got patched by npm running on the server)

#

when deployed on the server (i assume it's linux-based), it discovered that there are missing swc binary dependencies (other system/architectures' binaries), so it added them into the package-lock.json and asked to be npm install-ed

#

weirdly enough on my linux system, npm listed every possible swc binaries for every architecture and systems on package-lock.json, only for it to fail when npm install-ed:

#

perhaps it's a some kind of quirk on linux systems where it'll need to have the dependencies listed on package-lock.json even when it failed to resolve when npm install-ed?

graceful cove
#

I discovered there is an env you can use to bypass NEXT_IGNORE_INCORRECT_LOCKFILE but again this feels wrong

graceful cove
graceful cove
#

Looks like upgrading to 13.5.1 fixes the issue, so we're just going to go that route 😅