SyntaxError: Cannot use import statement outside a module
See original GitHub issuehi, bundle crashes after last update
Documents\projects\sed_flexible_reports\node_modules\@ctrl\tinycolor\dist\module\conversion.js:1
import { bound01, pad2 } from './util';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at compileFunction (<anonymous>)
at wrapSafe (internal/modules/cjs/loader.js:1071:16)
at Module._compile (internal/modules/cjs/loader.js:1121:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
at Module.load (internal/modules/cjs/loader.js:1001:32)
at Function.Module._load (internal/modules/cjs/loader.js:900:14)
at Module.require (internal/modules/cjs/loader.js:1043:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (Documents\projects\sed_flexible_reports\node_modules\@ant-design\colors\dist\index.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:1157:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
at Module.load (internal/modules/cjs/loader.js:1001:32)
at Function.Module._load (internal/modules/cjs/loader.js:900:14)
at Module.require (internal/modules/cjs/loader.js:1043:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (Documents\projects\sed_flexible_reports\node_modules\@ant-design\icons\lib\utils.js:22:15)
```
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
"Uncaught SyntaxError: Cannot use import statement outside ...
This means that you're using the native source code in an unaltered/unbundled state, leading to the following error: Uncaught SyntaxError: ...
Read more >Cannot use import statement outside a module [React ...
When building a web application, you may encounter the SyntaxError: Cannot use import statement outside a module error.
Read more >How to fix "cannot use import statement outside a module"
I stumbled on this error: Uncaught SyntaxError: cannot use import statement outside a module while importing a function from a JavaScript ...
Read more >How to solve: cannot use import statement outside a module
When you see the error message Uncaught SyntaxError: cannot use import statement outside a module, it means you're using an import statement ......
Read more >Cannot use import statement outside a module - Future Studio
A common error with modules is the “Uncaught SyntaxError: Cannot use import statement outside a module”. This error means you must ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/ant-design/ant-design-colors/commit/0f15e9570ce34a6499229f2ae9312be8c9696758
or for a more semi-permanent fix until a new release is published is to add the following to package.json until the breaking change is fixed (if you use yarn):