You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Congratz for the work, this tool greatly facilitate migrations. 👏
I've noticed a few errors with the Sass script and would like to share with you.
I'm running this environment:
Windows 10
Node: v12.18.0
bash
Not specifying node will prevent the script to be run by bash
This could be general knowledge but might confuse a few Windows users and would benefit from being added to the README.
This is what it logs without it
>../sass-to-emotion/index.js ./my-folder/file.scss
'..' is not recognized as an internal or external command,
operable program or batch file.
A local install of Prettier causes the script to fail
This is what it logs
>node ../sass-to-emotion/index.js ./my-folder/file.scss
Transforming 1 files...
prettier-eslint [ERROR]: prettier formatting failed due to a prettier error
c:\sass-to-emotion\node_modules\prettier-eslint\dist\index.js:147
throw error;
^
ConfigError: Couldn't resolve parser "babylon" at resolveParser (C:\my-folder\node_modules\prettier\index.js:11343:15) at normalize$1 (C:\my-folder\node_modules\prettier\index.js:11438:18) at formatWithCursor (C:\my-folder\node_modules\prettier\index.js:15034:12) at C:\my-folder\node_modules\prettier\index.js:51620:12 at Object.format (C:\my-folder\node_modules\prettier\index.js:51640:12) at prettify (c:\sass-to-emotion\node_modules\prettier-eslint\dist\index.js:137:31) at format (c:\sass-to-emotion\node_modules\prettier-eslint\dist\index.js:105:12) at module.exports (c:\sass-to-emotion\transform.js:682:10) at c:\sass-to-emotion\index.js:29:18 at Array.map (<anonymous>)
Note: after uninstalling Prettier it still logs this non-blocking warning:
{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
A glob selection with a wildcard causes the script to fail
This is what it logs
>node ../sass-to-emotion/index.js ./my-folder/**/*.scss
Transforming 1 files...
internal/fs/utils.js:230
throw err;
^
Error: ENOENT: no such file or directory, open 'C:/my-folder/**/*.scss'
at Object.openSync (fs.js:458:3)
at Object.readFileSync (fs.js:360:35)
at c:\dev\sass-to-emotion\index.js:23:22
at Array.map (<anonymous>)
at c:\dev\sass-to-emotion\index.js:22:6
at Object.<anonymous> (c:\sass-to-emotion\index.js:67:3)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14) {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'C:/my-folder/**/*.scss'
}
The Import path rewriting is incorrect (......)
Input:
Hey mate... Thanks so much for the the detailed issue, and apologies for the late reply.
For 1. I have updated the README and explicitly added node prefix to the command so it's clear for all users including windows.
For 2. I have fixed this in the code and upgrade to the latest prettier-eslint.
For 3 and 4 it seems to be a windows thing, it's really tricky for me and my colleagues to fix as we all use macs and linux so don't even have the ability to debug. I know issue 4 will be around this function. If you wanted to try fix 4 the test suite is pretty good, just run npm test -- --watch with a new test with the input Sass above and you should be in a good position to fix it. Sorry I can't help for these.
Hi there,
Congratz for the work, this tool greatly facilitate migrations. 👏
I've noticed a few errors with the Sass script and would like to share with you.
I'm running this environment:
node
will prevent the script to be run by bashThis could be general knowledge but might confuse a few Windows users and would benefit from being added to the README.
This is what it logs without it
and how to run it successfully:
>node ../sass-to-emotion/index.js ./my-folder/file.scss
This is what it logs
Note: after uninstalling Prettier it still logs this non-blocking warning:
This is what it logs
......
)Input:
Output:
Let me know if you require more details
The text was updated successfully, but these errors were encountered: