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
By now, Destiny could easily restructure scss files. And it seems like it's trying, without knowing, but not succeeding.
If a js/ts file imports a scss file like so:
import'./index.scss';
and this index.scss is importing another scss file without specifying the .scss extension in the path:
@import'./foo';
it will throw this error:
(node:9201) UnhandledPromiseRejectionWarning: Error: Cannot find module './foo' from '/home/anatole/dev/destiny-cra/src/index'
at Function.resolveSync [as sync] (/home/anatole/.npm/_npx/9201/lib/node_modules/destiny/node_modules/resolve/lib/sync.js:81:15)
at customResolve (/home/anatole/.npm/_npx/9201/lib/node_modules/destiny/lib/destiny.js:144:18)
at /home/anatole/.npm/_npx/9201/lib/node_modules/destiny/lib/destiny.js:182:33
at Array.forEach (<anonymous>)
at buildGraph (/home/anatole/.npm/_npx/9201/lib/node_modules/destiny/lib/destiny.js:175:21)
at formatFileStructure (/home/anatole/.npm/_npx/9201/lib/node_modules/destiny/lib/destiny.js:534:9)
at run (/home/anatole/.npm/_npx/9201/lib/node_modules/destiny/lib/destiny.js:650:9)
at Object.<anonymous> (/home/anatole/.npm/_npx/9201/lib/node_modules/destiny/lib/destiny.js:654:3)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
(node:9201) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9201) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
So the question is: are we extending to preprocessors like Prettier, or are we ignoring non js/ts files?
By now, Destiny could easily restructure scss files. And it seems like it's trying, without knowing, but not succeeding.
If a js/ts file imports a scss file like so:
and this
index.scss
is importing another scss file without specifying the.scss
extension in the path:it will throw this error:
So the question is: are we extending to preprocessors like Prettier, or are we ignoring non js/ts files?
I made a repo to replicate:
https://github.com/AnatoleLucet/destiny-scss-error
Simply clone it, and run
npm destiny src
The text was updated successfully, but these errors were encountered: