Nino59 Posted May 30, 2021 Share Posted May 30, 2021 Environment: Windows 10 Prestashop 1.7 node v12.15.0 I am following a tutorial to create a prestashop theme. It uses sass & npm to compile the theme.css from theme.scss. When I run: npm run watch I get this error message: ERROR in Cannot find module 'node-sass' So I searched for a solution and I had to run this command: npm install -g node-sass in order to install the proper version. But it didn't change anything. The command "npm run watch" is still showing an error about "node-sass not installed". On screenshot you can see the successful installation of node-sass: On screenshot can see "node-sass" in the package.json: On screenshot you can see the error: WHAT I TRIED : I tried different command to rebuild, reinstall and other stuff without any success: npm rebuild node-sass npm install -g --safe-dev --unsafe-perm node-sass I still have the same issue. So what can I do? Link to comment Share on other sites More sharing options...
ComGrafPL Posted May 30, 2021 Share Posted May 30, 2021 1 hour ago, Nino59 said: Environment: Windows 10 Prestashop 1.7 node v12.15.0 I am following a tutorial to create a prestashop theme. It uses sass & npm to compile the theme.css from theme.scss. When I run: npm run watch I get this error message: ERROR in Cannot find module 'node-sass' So I searched for a solution and I had to run this command: npm install -g node-sass in order to install the proper version. But it didn't change anything. The command "npm run watch" is still showing an error about "node-sass not installed". On screenshot you can see the successful installation of node-sass: On screenshot can see "node-sass" in the package.json: On screenshot you can see the error: WHAT I TRIED : I tried different command to rebuild, reinstall and other stuff without any success: npm rebuild node-sass npm install -g --safe-dev --unsafe-perm node-sass I still have the same issue. So what can I do? Try with: sudo npm install --save-dev --unsafe-perm node-sass Link to comment Share on other sites More sharing options...
Nino59 Posted May 30, 2021 Author Share Posted May 30, 2021 Thanks for your help. I did run "npm install --save-dev --unsafe-perm node-sass" as admin and I didn't see any error message. But when I go to _dev folder and run "npm install", I still get the error 404 about node-sass Link to comment Share on other sites More sharing options...
ComGrafPL Posted May 31, 2021 Share Posted May 31, 2021 16 hours ago, Nino59 said: Thanks for your help. I did run "npm install --save-dev --unsafe-perm node-sass" as admin and I didn't see any error message. But when I go to _dev folder and run "npm install", I still get the error 404 about node-sass You can only use a certain node-sass version range with a specific Node.Js version. So if you're you are using Node 12 - you must update to [email protected] etc This should get rid of the errors. This is explained in the repos FAQ: https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#404s Either try with: Quote npm install -g npm@latest Link to comment Share on other sites More sharing options...
ComGrafPL Posted May 31, 2021 Share Posted May 31, 2021 (edited) You can only use a certain node-sass version range with a specific Node.Js version. So if you're you are using Node 12 - you must update to [email protected] etc This should get rid of the errors. This is explained in the repos FAQ: https://github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md#404s Either try with: Quote npm install -g npm@latest Edited May 31, 2021 by ComGrafPL (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now