npm run dev

> dev
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

/var/www/html/web/themes/custom/bls/node_modules/webpack-cli/bin/cli.js:93
				throw err;
				^

Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (88)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
    at module.exports (/var/www/html/web/themes/custom/bls/node_modules/node-sass/lib/binding.js:13:13)
    at Object.<anonymous> (/var/www/html/web/themes/custom/bls/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (/var/www/html/web/themes/custom/bls/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
    at Module.require (node:internal/modules/cjs/loader:972:19)
    at require (/var/www/html/web/themes/custom/bls/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at implementation (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/components/Sass.js:56:27)
    at /var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/components/Preprocessor.js:138:61
    at global.tap (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/helpers.js:10:5)
    at Sass.loaderOptions (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/components/Preprocessor.js:136:9)
    at /var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/components/Preprocessor.js:95:39
    at global.tap (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/helpers.js:10:5)
    at /var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/components/Preprocessor.js:27:13
    at Array.forEach (<anonymous>)
    at Sass.webpackRules (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/components/Preprocessor.js:22:22)
    at ComponentFactory.applyRules (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/components/ComponentFactory.js:155:23)
    at /var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/components/ComponentFactory.js:66:48
    at /var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/Dispatcher.js:34:47
    at Array.forEach (<anonymous>)
    at Dispatcher.fire (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/Dispatcher.js:34:28)
    at Mix.dispatch (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/Mix.js:118:25)
    at WebpackConfig.buildRules (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/builder/WebpackConfig.js:90:13)
    at WebpackConfig.build (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/src/builder/WebpackConfig.js:23:14)
    at Object.<anonymous> (/var/www/html/web/themes/custom/bls/node_modules/laravel-mix/setup/webpack.config.js:29:38)
    at Module._compile (/var/www/html/web/themes/custom/bls/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
    at Module.load (node:internal/modules/cjs/loader:948:32)
    at Function.Module._load (node:internal/modules/cjs/loader:789:14)
    at Module.require (node:internal/modules/cjs/loader:972:19)
    at require (/var/www/html/web/themes/custom/bls/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at WEBPACK_OPTIONS (/var/www/html/web/themes/custom/bls/node_modules/webpack-cli/bin/utils/convert-argv.js:114:13)
    at requireConfig (/var/www/html/web/themes/custom/bls/node_modules/webpack-cli/bin/utils/convert-argv.js:116:6)
    at /var/www/html/web/themes/custom/bls/node_modules/webpack-cli/bin/utils/convert-argv.js:123:17
    at Array.forEach (<anonymous>)
npm ERR! code 1
npm ERR! path /var/www/html/web/themes/custom/bls
npm ERR! command failed
npm ERR! command sh -c cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

Comments

yi_jiang created an issue. See original summary.

yi_jiang’s picture

npm install

npm ERR! code 1
npm ERR! path /var/www/html/web/themes/custom/bls/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory `/var/www/html/web/themes/custom/bls/node_modules/node-sass/build'
npm ERR!   CXX(target) Release/obj.target/libsass/src/libsass/src/ast.o
npm ERR! make: Leaving directory `/var/www/html/web/themes/custom/bls/node_modules/node-sass/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.0.1 | linux | x64
npm ERR! gyp info find Python using Python version 2.7.18 found at "/usr/bin/python"
npm ERR! gyp http GET https://nodejs.org/download/release/v15.0.1/node-v15.0.1-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v15.0.1/node-v15.0.1-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v15.0.1/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v15.0.1/SHASUMS256.txt
npm ERR! gyp info spawn /usr/bin/python
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/ec2-user/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/var/www/html/web/themes/custom/bls/node_modules/node-sass/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/ec2-user/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/ec2-user/.cache/node-gyp/15.0.1/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/ec2-user/.cache/node-gyp/15.0.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/ec2-user/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/ec2-user/.cache/node-gyp/15.0.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/var/www/html/web/themes/custom/bls/node_modules/node-sass',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! make: g++: Command not found
npm ERR! make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 127
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/home/ec2-user/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:327:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
npm ERR! gyp ERR! System Linux 4.14.200-155.322.amzn2.x86_64
npm ERR! gyp ERR! command "/home/ec2-user/.nvm/versions/node/v15.0.1/bin/node" "/home/ec2-user/.nvm/versions/node/v15.0.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /var/www/html/web/themes/custom/bls/node_modules/node-sass
npm ERR! gyp ERR! node -v v15.0.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
yi_jiang’s picture

removed the node_sass works

doxigo’s picture

Hey Yi, it's environment related issue, Not all packages work with the latest node versions, try removing node_modules and switch to lets say node 12 and try again

doxigo’s picture

Category: Bug report » Support request
doxigo’s picture

Status: Active » Fixed

the same as the other issue, closing it

yi_jiang’s picture

actually come back this, you dont need node-sass module. Laravel-mix builtin sass. Node-sass got same issue on node 13 which isnt good encourage users to use node12

doxigo’s picture

Status: Fixed » Needs review

Hey Yi, thanks for noting that
I'll have to test if the built-in handling of the laravel-mix wouldn't cause any drawbacks

Also, the limitation on node12 is due to the CriticalCSS part, I'm not aware of Node 13 issue with node-sass, not sure what to do here.

might have to come up with another up to dated package for the critical CSS part

yi_jiang’s picture

You are right, I think the node-sass is different issue for node13 for me. but I totally remove it, no harm!

In term of the criticalCSS, I would suggest leave it for optional if the fancy doco could be happened in the future.

doxigo’s picture

Version: 3.1.0 » 3.1.x-dev
Status: Needs review » Fixed

Yi I did manage to switch to a more prominent package for criticalCSS which supports and do not have hardcoded dependency to a certain node env. Works with the latest LTS releases:

https://git.drupalcode.org/project/bootstrap_storybook/commit/f6a0b1e

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.