I tried with all possible nodejs version and npm via nvm, I tried to downgrade/upgrade ng core and ng cli tried to install sass-node and removed sass and vice versa nothing seems to work. I've googled all stack overflow question there are many very similar to mine but nothing seems to solve
CodePudding user response:
Hi after a lt f research and test this will works : assuming this environment
- node -v
- v14.20.1
- npm -v
- 9.1.2
- git --version
- git version 2.34.1
after you successfull npm install all the packages without errors just :
- npm uninstall sass
- npm uninstall node-sass
- npm install [email protected]
an then ng serve build or whatever
CodePudding user response:
I had the same issue and it happened because I deleted a scss variable, so when it compiled it had something like:
height: ;
Debugging wasn't easy but I managed to disable minification and optimization modifiying angular.json with: https://angular.io/guide/workspace-config#optimization-configuration
"optimization": {
"scripts": true,
"styles": {
"minify": false,
"inlineCritical": false
},
"fonts": true
}
Then I searched for the style created by ng build
in the dist folder and pasted on a editor that showed me the error.