components icon indicating copy to clipboard operation
components copied to clipboard

Cannot find module 'node-sass'

Open igsm opened this issue 8 years ago • 5 comments

I am trying to make custom theme working, but after I add theme.scss to the styles list in the angular-cli.json (as suggested in docs) and then start the project, I get the following error:

Module build failed: Error: Cannot find module 'node-sass'

I can't figure out what causes this issue.

P.S. I installed the latest Angular Material version 5.0.0

igsm avatar Dec 09 '17 21:12 igsm

Have you deleted package-lock.json before npm install? I had headaches sometime ago because of not deleting it. Also remove node_modules before npm install.

julianobrasil avatar Dec 11 '17 01:12 julianobrasil

@julianobrasil yes, I messed up with node and npm. It gave me really a lot of headache. I had to delete all traces of node and npm and install it again with brew. After that everything works fine.

igsm avatar Dec 11 '17 22:12 igsm

Senhores, só para ver se agrega ai para voces. Depois de executar os comandos abaixo FUNCIONOU! Usando Ubuntu

sudo -s
sudo npm cache verify
sudo rm package-lock.json
sudo rm -rf node_modules
sudo npm install
sudo npm install node-sass

raydacosta avatar Nov 25 '18 16:11 raydacosta

Tuve el mismo problema con las siguientes versiones node v10.15.3 y npm 6.4.1 1.Deberá ubicarse en la ruta del proyecto angular 2.Ejecutar los siguientes conmandos : npm cache verify rm package-lock.json 3.Se debe eliminar la carpeta node_modules completa en caso de que ya exista 4.Ejecutar los siguientes conmandos : npm install npm install node-sass

ssalaza7 avatar Apr 03 '19 13:04 ssalaza7

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.