-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Cannot assign to read only property 'cflags' of object '#<Object>' #2752
Comments
Here is the text that you deleted when you opened this issue... Please look thru your error log for the string Requests for help with |
Note the above instructions don't work in npm 9. What did work and force nodejs to use the correct |
This is a relatively old project. I'm not sure how randomly upgrading node-gyp will solve it and not break a bunch of other things.
|
I can't upgrade it because it's not one of our main dependencies. Some other package is depending on it. |
I was trying to rebuild ref-napi and ffi-napi for electron and the same error showed up. Adding |
ffi-napi is another set of problems. |
Adding dev dependencies |
In my case moving the folder |
I was trying to install a project from 2022 that has
|
Correct. Repeating from above (#2752 (comment)), |
Sure, but this is a node-gyp problem, not a node-sass problem. Since this ticket is what comes up if you search for "resolutions": {
"//": [
"Pull in https://github.com/nodejs/node-gyp/pull/2368 (first included in",
"v8.2.0) for compatibility with Node 16+"
],
"node-gyp": "8.2.0",
} You should of course upgrade to a newer node-gyp if you can; but if you're trying to get an old project going again, you probably want to be as conservative as you can for a bit. If you are using node-sass, you'll need the above, but you'll also need at least node-sass 6.0 for that version of node-gyp: "resolutions": {
"//": [
"Pull in https://github.com/nodejs/node-gyp/pull/2368 (first included in",
"v8.2.0) for compatibility with Node 16+"
],
"node-gyp": "8.2.0",
"//": [
"Since node-gyp 8.2.0 requires C++20 or later, we require at least",
"node-sass v6 which is the first to no longer force `-std=c++0x`"
],
"node-sass": "6.0.0"
} You should of course look into migrating from |
build node-sass error
c++ compiler
gcc -E -dM - </dev/null | grep "STDC_VERSION"
#define STDC_VERSION 201710L
The text was updated successfully, but these errors were encountered: