Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install does not work #29

Open
bnzone opened this issue Jan 31, 2023 · 3 comments
Open

npm install does not work #29

bnzone opened this issue Jan 31, 2023 · 3 comments

Comments

@bnzone
Copy link

bnzone commented Jan 31, 2023

Using node 16 or 18 the installation script seems to be failing

@prateeksamudrala
Copy link

Assuming it is "npm ERR! code 1 command failed"

It occurs when you aren't able to install a specific NPM package with your version of Node.js.

To solve the error, install a version of the package that is compatible with your Node.js version and update your dependencies.

Assuming your error is with node-sass package. Here is how to solve it:

Note: If your error is a different package, replace node-sass with that package name. The second line of the error should show which error it is.

npm install node-sass@latest --legacy-peer-deps
npx npm-check-updates -u
`# [npm-check-updates] package to update your package.json dependencies to the latest version.

``npm install`

@tnajim
Copy link

tnajim commented Jul 25, 2023

No error message? If it's the same as my problem, you might need to have python installed on your device to compile the node-sass package

@kenchung285
Copy link

node-sass package is no longer used.
Please change the package into sass by:

npm uninstall node-sass
npm install sass

Besides, your package.json also need some modification of the node-sass commands. Please find and change these lines:

"compile:scss": "node-sass sass/main.scss css/style.css -w",
"compress:css": "node-sass css/style.css css/style.css --output-style compressed",

into

"compile:scss": "sass sass/main.scss css/style.css --watch",
"compress:css": "sass css/style.css css/style.css --style=compressed",

Last, you will need to modify codes under sass/ due to the package update.
Please follow the instruction in this website: Migrating from Node-Sass to Sass (Dart-Sass) with npm by Clément Creusat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants