MobX failed to load / unexpected token #1920
Unanswered
winkler1
asked this question in
Troubleshooting
Replies: 2 comments 4 replies
-
oh interesting. Are you on the latest version of Snowpack? This used to be an issue, but we now use an AST-based See esinstall/src/rollup-plugins/rollup-plugin-node-process-polyfill.ts |
Beta Was this translation helpful? Give feedback.
3 replies
-
Can you upgrade mobx? On 5.x I see:
And on 6.0 that file no longer exists |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm on an old version of MobX, 4.0.0, and got this--
[snowpack] Failed to load node_modules/mobx/lib/mobx.module.js
Unexpected token (3978:69) in /node_modules/mobx/lib/mobx.module.js
This turns out to be a comment:
console.warn("[mobx] you are running a minified build, but 'process.env.NODE_ENV' was not set to 'production' in your bundler. This results in an unnecessarily large and slow bundle");
My guess: some regex code, not AST, is not grok'ing NODE_ENV is within a quoted string?
Beta Was this translation helpful? Give feedback.
All reactions