facing an error with node-sass command failed and Error: Command failed: yarnpkg add -W caniuse-lite

39 views Asked by At

I have updated my nodejs version 18.19.1 and npm version 10.4.0 to resolve a compatibility issue. Since updating the below error is thrown:

SyntaxError: EOL while scanning string literal
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/var/canvas/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
gyp ERR! System Linux 5.15.0-1053-aws
gyp ERR! command "/usr/bin/node" "/var/canvas/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/canvas/node_modules/node-sass
gyp ERR! node -v v18.19.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
error /var/xyz/node_modules/node-sass: Command failed.
Exit code: 1

Error: Command failed: yarnpkg add -W caniuse-lite

How do I resolve this error and install NodeJS correctly?

I am using Ubuntu 20LTS.

0

There are 0 answers