I was attempting to run npm install on one of my projects however, I encountered an error in common.gypi regarding the Syntax of line 1 "'uv_library%': 'static_library',"
If anyone has any suggestions that'll be greatly appreciated! Using Mac, Node v18.18.0, NPM 9.8.1, Python 2.7.18 and 3.9.6
Error Message:
File "/Users/MYNAME/.node-gyp/18.18.0/include/node/common.gypi", line 1
npm ERR! 'uv_library%': 'static_library',
npm ERR! ^
npm ERR! SyntaxError: invalid syntax
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
Tried uninstalling Python2 (turns out it's needed, looked for a supported version), reinstalled Node + NPM, still seeing error message when running npm install, and also in the common.gypi file itself with various Python/pylance syntax errors
'uv_library%': 'static_library',
'clang%': 0,
'error_on_warn%': 'false',
'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
'openssl_no_asm%': 0,
# Don't use ICU data file (icudtl.dat) from V8, we use our own.
'icu_use_data_file_flag%': 0,
# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.26',
##### V8 defaults for Node.js #####
# Turn on SipHash f{
It seems like node-sass has a problem in node v18 environment. Replacing node-sass with the sass package has eliminated the problem.
yarn remove node-sass
yarn add sass
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With