Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postinstall script not found #4362

Closed
7 of 10 tasks
subhankar-trisetra opened this issue Jul 12, 2023 · 15 comments · Fixed by #4363
Closed
7 of 10 tasks

postinstall script not found #4362

subhankar-trisetra opened this issue Jul 12, 2023 · 15 comments · Fixed by #4363

Comments

@subhankar-trisetra
Copy link
Contributor

subhankar-trisetra commented Jul 12, 2023

Description

➤ YN0009: │ @google/model-viewer@npm:3.2.0 [58ced] couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-dcba39bc/build.log)
➤ YN0007: │ trisetra-decor@workspace:. must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 6s 348ms
➤ YN0000: Failed with errors in 19s 639ms
# This file contains the result of Yarn building a package (@google/model-viewer@virtual:58ced34e477cff2c62a5e26ca6c375fed90e1af1a4fcc875901614bfd6afa62fbc58ffae3a1f03b621a96e23ef501c7dc5c56da1d8c169f9ff70fe73a6e888d7#npm:3.2.0)
# Script name: postinstall

node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module '/home/subhankar/workspace/trisetra-decor/node_modules/scripts/postinstall.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.16.0

This error pops up when I try to install @google/model-viewer with Yarn 2+. I works perfectly fine with "@google/model-viewer": "^3.1.1"

Version

  • model-viewer: v3.2.0
  • yarn: v3.6.1
  • node: v18.16.0

Browser Affected

  • Chrome, version: xx.x.xxxx.xx
  • Edge
  • Firefox
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows
@KaiSoellch
Copy link

same here

@btopro
Copy link
Contributor

btopro commented Jul 12, 2023

also confirming this happens with yarn 1.22.18. My yarn install has a postinstall which it appears that this project including the hook has it run as well. As I don't have that file in my setup it bombs

@annahassel
Copy link
Contributor

same

@jgalindosl
Copy link

I was able to get it to work with the following workaround:

npm install --ignore-scripts

although, this will ignore scripts for all packages.

@btopro
Copy link
Contributor

btopro commented Jul 13, 2023

I'd recommend cutting a release off this as it breaks all tooling to install 3.2.0 currently

@subho57
Copy link

subho57 commented Jul 14, 2023

I'd recommend cutting a release off this as it breaks all tooling to install 3.2.0 currently

@elalish Can you cut a release as v3.2.1 as a hotfix for this issue?

@elalish
Copy link
Collaborator

elalish commented Jul 14, 2023

working on it, but we need a better fix: #4368, which isn't quite ready yet. See you on Monday.

@cipas
Copy link

cipas commented Jul 21, 2023

hey @elalish any news on this? thanks

@concman
Copy link

concman commented Jul 24, 2023

same issue here, can't update the latest version of model-viewer through yarn, getting the same error

@asilliahmet
Copy link

same here as well, tried node 18.17 and 20.5's npms

@pReya
Copy link

pReya commented Jul 25, 2023

While this is getting fixed, you can either use

npm i @google/model-viewer --ignore-scripts or you can install an older version:
npm i @google/model-viewer@3.1.1

@concman
Copy link

concman commented Jul 25, 2023

Well, while it's working with yarn add @google/model-viewer --ignore-scripts locally, that can't be appropriate approach to push this code to remote repository, because CloudFlare is not going to download dependencies with the following script. That may cause problem.

@elalish
Copy link
Collaborator

elalish commented Jul 31, 2023

Sorry, this turned into a bit of a perfect storm of difficult timing. My wife just gave birth, so I've been on parental leave. Working on this now, hopefully I'll have a release out this week, finally.

@muuvmuuv
Copy link

Congrats! No hurry, better leave that computer off and take your time. We wont retire because of that :D

@asilliahmet
Copy link

asilliahmet commented Sep 13, 2023

While this is getting fixed, you can either use

npm i @google/model-viewer --ignore-scripts or you can install an older version: npm i @google/model-viewer@3.1.1

This did not work for me, however installing a specific three version along with it did. What i did was:
npm i @google/model-viewer@3.1.1
npm i three@0.151.2
Congrats to elalish in the meantime!

JL-Vidinoti pushed a commit to vidinoti/model-viewer that referenced this issue 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 a pull request may close this issue.