Unexpected token export
See original GitHub issueHello recharts team, since V1.0.0, I have an error caused by lodash-es:
Unexpected token export
/Users/xx/Documents/Devs/xx/node_modules/lodash-es/isNil.js:25
export default isNil;
^^^^^^
SyntaxError: Unexpected token export
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (internal/modules/cjs/loader.js:618:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/Users/xx/Documents/Devs/xx/node_modules/recharts/lib/util/ReactUtils.js:8:15)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
My project run with Next.js and an internal dependency library that embed another internal dependency library that need recharts
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Getting Unexpected Token Export - javascript - Stack Overflow
You are using EcmaScript Module (ESM or 'ES6 Modules') syntax but your environment does not support it. NodeJS versions prior to v14.13.0 do...
Read more >SyntaxError: Unexpected token 'export' in JavaScript
To solve the "Uncaught SyntaxError Unexpected token 'export'" error, set the type property to module in your package.json file.
Read more >How to fix SyntaxError: Unexpected token 'export' in JavaScript?
In this article, we are going to see How to fix SyntaxError: Unexpected token 'export' in JavaScript? and what are Es6 modules.
Read more >How to Solve Unexpected Token 'export' Error in JavaScript
To solve the "Uncaught SyntaxError Unexpected token 'export'" error, set the type property to module in your package.json file.
Read more >Syntaxerror: unexpected token 'export' - Kodlogs.net
The error says that the export token was unexpected and that means the Javascript runtime parser has not been able to understand the...
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
Sorry for the bug, It has been fixed in
1.0.1
.This is happening for us as well. We have meanwhile fixated recharts to
1.0.0-beta.10
inpackage.json
as a temporary workaround.