简体   繁体   中英

sass showing this while compiling 'Cannot find module'

I installed sass with npm $npm install sass then I made a script in JSON but it didn't run kept showing an error 'Cannot find module'

It started working when I installed sass as devDependencies

$npm i --save-dev sass

and don't forget to give the

--watch 

flag on the package.json

"scripts": {
"sass": "sass --watch scss:assets/css"
},

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM