Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 248 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error /node_modules/node-sass: Command failed

#1
When I tried install vue store front in my local but when I tried "yarn install" command I get following error. How can I solve this error? How can I solve this error?

error /var/www/html/vue-storefront/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /var/www/html/vue-storefront/node_modules/node-sass
Output:
Building: /usr/bin/node /var/www/html/vue-storefront/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/usr/bin/node',
gyp verb cli '/var/www/html/vue-storefront/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "/usr/bin/python3.6" in the PATH
gyp verb `which` succeeded /usr/bin/python3.6 /usr/bin/python3.6
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python3.6 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:303:12)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1026:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
gyp ERR! System Linux 4.15.0-88-generic
gyp ERR! command "/usr/bin/node" "/var/www/html/vue-storefront/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/html/vue-storefront/node_modules/node-sass
gyp ERR! node -v v13.9.0

Reply

#2
Just upgrade your **sass** version in your `yarn.lock` file.
For node 14 the appropriate version for `node-sass` is `4.14`.
So adapt to your node version.
Reply

#3
Faced the same issue. If you look at the error stack, it says:
```
Error: Command failed: /usr/bin/python3.6 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
File "<string>", line 1
import sys; print "%s.%s.%s" % sys.version_info[:3];
^
SyntaxError: invalid syntax
```
It's trying to use Python2 but instead uses Python3 which is not supported.

My system runs Python3 when called using the `python` command, so I fixed this by installing Python2 and aliasing it to the `python` command:
```bash
alias python=pyhton2.7
```
Reply

#4
I had the same issue upgraded the node-sass version to be the same as node version. with yarn just run:


yarn add node-sass

this will upgrade the version and fix the issue
Reply

#5
I solved this issue by installing the python 2.7 version on windows os.I had Python 3 installed before. This error happens because of the python version 3.
Reply

#6
Solutions here don't work for me.
Until I delete the node_modules folder and yarn.lock.

rm -rf node_modules
rm yarn.lock
yarn instal


Reply

#7
I ran into this issue when containerising a VueJs app.
I was using the node:15.12.0-alpine tag as base image before but the issue was fixed once I changed to the full node image (node:15.12.0) that uses debian-stretch.
Reply

#8
Install `node-sass` globally with `yarn`

Or
Add `node-sass` to your project
Reply

#9
I am running `Rails 6` and for some reason it was pulling `webpacker 4.3.0` which was pulling `node-sass 4.3.0` rather than `6.0.0` which is the latest as of the date of this post.

What worked for me is the following:

1. Deleting the `node_module` folder, `package-lock.json` and `yarn.lock`
2. In my `package.json`, I upgraded `rails/webpacker: 5.3.0`.
3. I then re-ran `yarn install`.
4. Then I ran `yarn add node-sass`

That worked like a charm, after trying everything else above.

I believe those were the exact steps, although to be honest I have been trying sooo many things and they didn't work and I finally got it to work so there is a possibility I may have missed a step, but I did my best to re-create it for any future frustrated soul out there.
Reply

#10


> It's failing because python3 is used here. Create a .npmrc file in the
> project folder containing python = "/usr/bin/python2.7" and install.
> According to link, python 3.x.x is not yet supported. – NaceurBouhamed
> Feb 25 '20 at 12:28


****python = "**localpath**/python27/python.exe"

RESOLVED
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through