-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
We have #44 but it's about Yarn 1 I think.
yarn add node results in an error with the following logs:
# This file contains the result of Yarn building a package (node@npm:14.18.1)
# Script name: preinstall
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module '/Users/federicozivolo/Projects/app/node_modules/node/bin/node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
I think the problem is that Yarn 3.x runs preinstall hooks as part of the postinstall cycle.
I'm on macOS 11.6 running Node.js 14.18.1