Closed btopro closed 1 year ago
Hi, i just encountered this issue again,
npm ERR! path /Users/node_modules/@google/model-viewer npm ERR! command failed npm ERR! command sh -c node ../../scripts/postinstall.js npm ERR! node:internal/modules/cjs/loader:942 npm ERR! throw err; npm ERR! ^ npm ERR! npm ERR! Error: Cannot find module '/Users/node_modules/scripts/postinstall.js' npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:939:15) npm ERR! at Module._load (node:internal/modules/cjs/loader:780:27) npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) npm ERR! at node:internal/main/run_main_module:17:47 { npm ERR! code: 'MODULE_NOT_FOUND', npm ERR! requireStack: [] npm ERR! } npm ERR! npm ERR! Node.js v18.0.
…issues/4362
Reference Issue
Should fix #4362 introduced in version 3.2.0
This is a highly tooling specific script request which in
yarn
will cascade when projects implement 1 of the packages but not the entire mono-repo. I am using the model viewer tag in my own monorepo and yarn will call all thepostinstall
hooks it finds, looking then forwhatever/node_modules/scripts/postinstall.js
which is not a thing for downstream consumers.I can't install w/ a fresh lock file currently but this is pattern off the other verifications of a file existing to avoid errors.