error /node_modules/node-sass: Command failed

146 views
Skip to first unread message

oraganti adithya

unread,
Feb 23, 2024, 6:46:33 AMFeb 23
to Canvas LMS Users
We facing an issue istalling the canvas application 2021 version using ubuntu 20LTS verison and nodev18.19.1, npm virsion  10.4.0 getting bellow error.

   File "/var/canvas/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 271, in LoadOneBuildFile
    aux_data, includes, check)
  File "/var/canvas/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 308, in LoadBuildFileIncludesIntoDict
    LoadOneBuildFile(include, data, aux_data, None, False, check),
  File "/var/canvas/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 251, in LoadOneBuildFile
    None)
  File "/root/.node-gyp/18.19.1/include/node/common.gypi", line 1
    e_data_file_flag%': 1
                        ^
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

    at checkExecSyncError (node:child_process:890:11)
    at execSync (node:child_process:962:15)
    at updatePackageManually (/root/.npm/_npx/072487b38308305a/node_modules/update-browserslist-db/index.js:219:5)
    at updateDB (/root/.npm/_npx/072487b38308305a/node_modules/update-browserslist-db/index.js:289:5)
    at Object.<anonymous> (/root/.npm/_npx/072487b38308305a/node_modules/browserslist/cli.js:47:3)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
Problem with `yarnpkg add -W caniuse-lite` call. Run it manually.

    aux_data, includes, check)
  File "/var/canvas/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 308, in LoadBuildFileIncludesIntoDict
    LoadOneBuildFile(include, data, aux_data, None, False, check),
  File "/var/canvas/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 251, in LoadOneBuildFile
    None)
  File "/root/.node-gyp/18.19.1/include/node/common.gypi", line 1
    e_data_file_flag%': 1
                        ^
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: Command failed: yarnpkg add -W caniuse-lite
warning Resolution field "babel-plugin-dyn...@2.3.0" is incompatible with requested version "babel-plugin-dynamic-import-node@^2.3.3"
warning Resolution field "babel-plugin-dyn...@2.3.0" is incompatible with requested version "babel-plugin-dynamic-import-node@^2.3.3"
warning Resolution field "babel-plugin-dyn...@2.3.0" is incompatible with requested version "babel-plugin-dynamic-import-node@^2.3.3"
warning " > res...@1.2.1" has unmet peer dependency "styled-components@3.x || 4.x".

Juan Paulo Pérez Tejada

unread,
Feb 24, 2024, 12:13:40 AMFeb 24
to Canvas LMS Users
It seems as a Syntax error in node-gyp, which Python version is installed? Check if you're matching the requirements.

oraganti adithya

unread,
Apr 18, 2024, 5:45:12 AMApr 18
to Canvas LMS Users
I have multiple versions python2 and python3 how to resolve this
Reply all
Reply to author
Forward
0 new messages