builder icon indicating copy to clipboard operation
builder copied to clipboard

Getting "gyp ERR! UNCAUGHT EXCEPTION" when installing "@builder.io/react": "3.0.8"

Open shimi-malka-mh opened this issue 1 year ago • 1 comments

Running on node 20.14.0 (also reproduced on node 18) - run npm i @builder.io/[email protected] and above failed on error:

npm error code 7
npm error path /Volumes/mhdev/working-copies/frontend-shared-modules/shared-modules/builder-mapping-app/node_modules/isolated-vm
npm error command failed
npm error command sh -c prebuild-install || (node-gyp rebuild --release -j max && node-gyp clean)
npm error prebuild-install warn install No prebuilt binaries found (target=20.14.0 runtime=node arch=arm64 libc= platform=darwin)
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp info find Python using Python version 3.12.3 found at "/Library/Frameworks/Python.framework/Versions/3.12/bin/python3"
npm error gyp ERR! UNCAUGHT EXCEPTION
npm error gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
npm error gyp ERR! stack     at createConfigFile (/./node_modules/node-gyp/lib/configure.js:118:21)
npm error gyp ERR! stack     at ./node_modules/node-gyp/lib/configure.js:85:9
npm error gyp ERR! stack     at ./node_modules/mkdirp/index.js:30:20
npm error gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:187:23)
npm error gyp ERR! System Darwin 23.4.0
npm error gyp ERR! command "/usr/local/bin/node" ".s/node_modules/.bin/node-gyp" "rebuild" "--release" "-j" "max"
npm error gyp ERR! cwd ./builder-mapping-app/node_modules/isolated-vm
npm error gyp ERR! node -v v20.14.0
npm error gyp ERR! node-gyp -v v5.1.1
npm error gyp ERR! Node-gyp failed to build your package.
npm error gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.

Running the same command with "@builder.io/react": "3.0.7" works !

shimi-malka-mh avatar Jun 06 '24 18:06 shimi-malka-mh

hey @shimi-malka-mh I tried the steps using both node 18 and 20 on my ubuntu system but could not reproduce this error . I believe it might be caused because of some sub dependency .I believe @samijaber might elaborate

sahilsekr42 avatar Jul 04 '24 05:07 sahilsekr42

@shimi-malka-mh We are closing this issue given that it has gone stale.

We have CI jobs that build and deploy the latest SDKs and those builds succeed at this time.

I recommend you try again by updating to the latest React SDK (8.0.2 as of this comment), and let us know if you are still facing any issues.

samijaber avatar Jan 14 '25 21:01 samijaber