Error: Detected unsupported "use-node-version" in your ".npmrc". Please use "engines" in your "package.json" instead.
I have defined engines but it still requires me to remove use-node-version
Current
it always errors
Expected
Ignore use-node-version
and look for engines
anshumanb
(Anshuman Bhardwaj)
March 28, 2025, 5:35am
2
Hi @sw-scottwuca , is there any specific reason to keep use-node-version
in your .npmrc
file? If not, the fastest resolution would be to remove it.
Ya, that’s what I use to manage node versions in dev via pnpm
anshumanb
(Anshuman Bhardwaj)
March 28, 2025, 1:08pm
5
Hi @sw-scottwuca , I see. You can use engines in the package.json with engine-strict
config flag (see .npmrc ). For more information, see these docs .
The behaviour isn’t the same. engine-strict
limits the node version I can use. But use-node-version
automatically sets my node version to the correct one.
anshumanb
(Anshuman Bhardwaj)
March 31, 2025, 8:47am
7
Hi @sw-scottwuca , thanks for clarifying that. I’ll share this with our team.
Update:
I spoke to the team and there’s no way around it. You have to remove it for the builds to work correctly.
What is the purpose of this limitation?
In the meantime, I have a workaround by deleting that line during CI
// package.json
{
scripts: {
"deploy": "node ../scripts/deleteUseNodeVersion.js && ..."
}
}
anshumanb
(Anshuman Bhardwaj)
April 1, 2025, 4:41am
10
Hi @sw-scottwuca , it’s used internally to ensure our build environment works without being affected by user’s development/local settings.
Glad you found a workaround. Thanks for sharing it here.
system
(system)
Closed
April 8, 2025, 4:41am
11
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.