TypeError: Cannot read property 'GLOBAL_CACHE_DIR' of undefined when running in directory without node_modules #2267
Replies: 5 comments 10 replies
-
That error message is strange though, it almost looks like it's failing to import |
Beta Was this translation helpful? Give feedback.
-
I just got this error as well.
The weird part is, I just ran this command 4 or 5 days ago to build a svelte application using a template and it worked just fine. Initializing a npm project did fix the issue for me, thank you for that @mbleigh ! |
Beta Was this translation helpful? Give feedback.
-
I can reproduce now! Thanks all for the debugging info. Looks like it's an issue with circular dependencies in our final bundled package (which is CJS). Fix is here: #2366 |
Beta Was this translation helpful? Give feedback.
-
I'm having it too. Of course, users should use the tool the way it's intended, but the error message is more than a bit misleading :D |
Beta Was this translation helpful? Give feedback.
-
Hi ! I'm having this issue too, while i wanted to give a try to this tool. How can be solved ? I executed |
Beta Was this translation helpful? Give feedback.
-
When running e.g.
snowpack init
in a directory without anode_modules
folder, it crashes:This seems to be the culprit. I'm working around it by not running Snowpack in a non-noded-up folder, but thought it was worth mentioning.
Beta Was this translation helpful? Give feedback.
All reactions