Skip to content

check postinstall file exists https://github.com/google/model-viewer/…#4363

Merged
elalish merged 1 commit into
google:masterfrom
btopro:patch-1
Jul 13, 2023
Merged

check postinstall file exists https://github.com/google/model-viewer/…#4363
elalish merged 1 commit into
google:masterfrom
btopro:patch-1

Conversation

@btopro

@btopro btopro commented Jul 12, 2023

Copy link
Copy Markdown
Contributor

…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 the postinstall hooks it finds, looking then for whatever/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.

@elalish elalish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@elalish elalish merged commit 6af7342 into google:master Jul 13, 2023
@hilyas786

Copy link
Copy Markdown

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.

@elalish elalish mentioned this pull request Jul 14, 2023
JL-Vidinoti pushed a commit to vidinoti/model-viewer that referenced this pull request Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

postinstall script not found

3 participants