Using flow with snowpack #877
Replies: 5 comments 7 replies
-
Interesting, that error message lives in our package handling logic, which means that file is being treated as an npm package and not a source file. Can you share how you are importing the "javascript/shared-package/static-url.js" file in your package? If you import it by relative path, does the error go away? Check the docs for info on how to alias your imports, if you are trying to avoid importing this file by relative path. |
Beta Was this translation helpful? Give feedback.
-
The path of |
Beta Was this translation helpful? Give feedback.
-
I tried to reproduce the issue in a separate smaller repo and even copied the file over that causing the issue and it's working there. In the repo where the issue is all imports of |
Beta Was this translation helpful? Give feedback.
-
I think I found the issue. One of our node_modules is installed from a local path in the repo and it references static-url.js. |
Beta Was this translation helpful? Give feedback.
-
I was able to fix some of the issues by adding an
The current system only seems to allow aliases that point to other modules in the I'm going to see if I can try to add a third type of alias described above. @FredKSchott would you be willing to consider a PR for such addition? |
Beta Was this translation helpful? Give feedback.
-
I've tried getting it to work using the following config files:
snowpack.config.js
babel.config.js
But when I run
snowpack dev
I run into the following error:The line line in question is:
It seems like babel isn't transforming the file. I'm not sure what I'm doing wrong.
Beta Was this translation helpful? Give feedback.
All reactions