Replies: 1 comment
-
Not sure why, but this is deffo alias related, I changed all my paths to not use alias shortcuts and that resolved this error in the end. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using
@snowpack/app-template-react
migrating a react app over to snowpack. But hitting a "cannot find module" error. At a guess it sounds like a pathing issue however I cannot see an issue with my path now that the aliases are set.It wants to try import a js file as modules
In various components I want to import with:
snowpack installing... @components/CustomButtons/Button.js ✖ Cannot find module '@components/CustomButtons/Button.js'
snowpack.config.json
Path to file
./src/components/CustomButtons/Button.js
It seemingly wants to try import static files as a module?
returns:
It seems to do this for
.webp
files &.mp4
too.Update:
I think this issue is caused by aliases not working, my config:
Beta Was this translation helpful? Give feedback.
All reactions