New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI --source-map option broken #1026
Comments
This was a breaking change in v3, see #964. In your case, use |
I just hit this as well and the error message is very cryptic. What do you think about improving the error here if a value isn't present? |
I am of the opinion that node-sass --help ought to note that --source-map needs a boolean parameter. Otherwise most people would reasonably assume that this was just a standard unix parameter that did not need a boolean, especially when --output is specified. The --help option also does not specify that a directory argument can be added to --source-map. It should not be necessary to google the error or read the source: that's what the --help or man page is for. |
This error is still happening... I have this "scripts": {
"ts" : "node_modules\\.bin\\tsc -w -p .",
"sass_env" : "SET node-sass=node_modules\\.bin\\node-sass",
"sass_compile" : "npm run sass_env && node-sass styles -o styles --output-style compressed --source-map ",
"sass" : "npm run sass_compile && node-sass styles -wo styles --output-style compressed --source-map "
} When I execute
re-open? |
Documentation says Accroding to this issue the correct syntax is to include a Would suggest a update on docs. |
Thank you @AntonKL It worked as expected! |
Docs still not updated. Thumbs up @AntonKL |
* Install node-sass in Dockerfile-base * Update Makefile "echo" for "compilecss" step * Update node-sass call to use "--source-map true" (see sass/node-sass#1026)
* Install node-sass in Dockerfile-base * Update Makefile "echo" for "compilecss" step * Update node-sass call to use "--source-map true" (see sass/node-sass#1026)
* Install node-sass in Dockerfile-base * Update Makefile "echo" for "compilecss" step * Update node-sass call to use "--source-map true" (see sass/node-sass#1026)
* Install node-sass in Dockerfile-base * Update Makefile "echo" for "compilecss" step * Update node-sass call to use "--source-map true" (see sass/node-sass#1026)
* Install node-sass in Dockerfile-base * Update Makefile "echo" for "compilecss" step * Update node-sass call to use "--source-map true" (see sass/node-sass#1026)
* Install node-sass in Dockerfile-base * Update Makefile "echo" for "compilecss" step * Update node-sass call to use "--source-map true" (see sass/node-sass#1026)
* Install node-sass in Dockerfile-base * Update Makefile "echo" for "compilecss" step * Update node-sass call to use "--source-map true" (see sass/node-sass#1026)
It is not clear from the `--help` docs that `--source-map` requires a boolean or path. Passing the flag alone results in a TypeError. There's an argument to be made that passing the flag alone should imply `true`, or at the very least it should fail with a helpful error, not a cryptic TypeError. For now, this PR fixes the --help docs so that they match the README.
It is not clear from the `--help` docs that `--source-map` requires a boolean or path. Passing the flag alone results in a TypeError. There's an argument to be made that passing the flag alone should imply `true`, or at the very least it should fail with a helpful error, not a cryptic TypeError. For now, this PR fixes the --help docs so that they match the README.
5 years later, and the error message is still just as cryptic.
|
One more year to the counter, seriously add some code handle this |
In a new directory, create a test.scss file with one line of css, save then in CLI run:
node-sass test.scss test.css --source-map
You will get the following error:
The text was updated successfully, but these errors were encountered: