Following this writeup I am trying to write a script to compile my sass into css using node-sass.
This is my package.json scripts part:
"scripts" : {
"prestart" : "babel-node tools/startMessage.js",
"start" : "npm-run-all --parallel open:src lint:watch sass:watch test:watch",
"open:src": "babel-node tools/srcServer.js",
"lint": "node_modules/.bin/esw webpack.config.* src tools",
"lint:watch": "npm run lint -- --watch",
"sass": "node-sass src/assets/**/*.scss src/assets/css",
"sass:watch": "npm run sass -- --watch",
"test:watch": "npm run test -- --watch",
"test": "mocha --reporter progress tools/testSetup.js \"src/**/*.test.js\""
},
now when I run npm run sass
trough the terminal I get the following message:
[email protected] sass /Users/shooshte/PersonalProjects/introductionReact node-sass src/assets/**/*.scss src/assets/css
Rendering Complete, saving .css file... Error: EISDIR: illegal operation on a directory, open '/Users/shooshte/PersonalProjects/introductionReact/src/assets/css'
Both of the directories are created. What am I doing wrong?
If you need more info, just comment or you can also view the GitHub repo.
Thanks for the help.
EISDIR
means you are trying to run an operation on a file, but you gave a directory (folder).
"sass": "node-sass src/assets/**/*.scss src/assets/css/*.css"
update the code to target a .css
file instead of a folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With