linuxmint / website-wizixo

59 stars 25 forks source link

Can't setup gulp and install npm modules! #9

Closed thevipinmishra closed 3 years ago

thevipinmishra commented 3 years ago

I globally installed gulp and after that I hit npm install and it throws an error!

I really want to contribute, but can't because of this :(

Error

Please help!

crydotsnake commented 3 years ago

Do you have the latest NodeJS Version?

kharbanda14 commented 3 years ago

as per the minimum requirements, for v4.14.1 you need node js v14, you can refer the following link https://www.npmjs.com/package/node-sass/v/4.14.1

thevipinmishra commented 3 years ago

Hey @crydotsnake & @kharbanda14

I am a web dev and my setups are very often updated, Its 16.4.2 on my machine currently, and latest lts version of Node is 16.6.0

So It's more than enough I think?

image

crydotsnake commented 3 years ago

Or you can use nvm (node version manager) to switch between nodejs versions.

thevipinmishra commented 3 years ago

@crydotsnake, Hi, I already havenvm, which npm version will do the task smoothly?

Any help?

crydotsnake commented 3 years ago

Try it with version: v11.15.0

nvm install 11 && nvm use 11

thevipinmishra commented 3 years ago

I don't know why am I not getting rid of this :(

Can someone please add some instructions on how to set up the project properly and what are the minimum dependencies?

It will be a great help!

image

tuliocll commented 3 years ago

I don't know why am I not getting rid of this :(

Can someone please add some instructions on how to set up the project properly and what are the minimum dependencies?

It will be a great help!

image

Send the full error log. You can try this:

npm rebuild node-sass

Below is a quick guide for minimum and maximum support supported version of node-sass: image

try to use nodejs 14, too (i using 15.9.0) image

atTheShikhar commented 3 years ago

I globally installed gulp and after that I hit npm install and it throws an error!

I really want to contribute, but can't because of this :(

Error

Please help!

Try uninstalling gulp from you global packages and then run npm install on this project's root directory. Global installs cause problems sometimes.

You can reference this article.

thevipinmishra commented 3 years ago

I think I am done here. Tried every latest node and npm, tried older ones as well. Uninstalled global instance of gulp, nothing worked here.

We could have gone simpler with the setup.

I am doing this on Linux here, LInux Mint to be specific.

tuliocll commented 3 years ago

I think I am done here. Tried every latest node and npm, tried older ones as well. Uninstalled global instance of gulp, nothing worked here.

We could have gone simpler with the setup.

I am doing this on Linux here, LInux Mint to be specific.

Please, post the full log of this command on pastebin:

node -v && npm install
clefebvre commented 3 years ago

You only need gulp if you want to work on the theme by the way... i.e. if you want to modify the SCSS and regenerate the assets. For anything else, a text editor, a terminal and a browser is enough.

Regarding gulp, I'm using the repository one personally.

thevipinmishra commented 3 years ago

@clefebvre Ofcourse I want to customize the theme itself and not the compiled src so that everything can stay synced with source.

Will do this log thing tomorrow.

whelmich commented 3 years ago

To make sass work with node 16.2, I updated the dependencies in package.json:

"gulp": "^4.0.2",
"gulp-sass": "^5.0.0",
"node-sass": "^6.0.1"

Also the sass import had to change in gulpfile.js line 4: var sass = require('gulp-sass')(require('node-sass'));

thevipinmishra commented 3 years ago

@whelmich, You are a lifesaver!!

Thanks a lot. It works perfectly now, without any warnings or errors.

I made the changes as you suggested and it runs perfectly.

Thanks a lot again!