SyntaxError: Unexpected token 'export'
See original GitHub issueEnvironment
- Operating System:
Windows_NT
- Node Version:
v14.18.0
- Nuxt Version:
3-3.0.0-27234503.d5127e9
- Package Manager:
Yarn
- Bundler:
Webpack
- User Config:
build
- Runtime Modules:
-
- Build Modules:
-
Describe the bug
When i install Element Plus it’s the error that i see
Reproduction
https://github.com/marckent04/nuxt3-first-app/tree/frontend
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Getting Unexpected Token Export - javascript - Stack Overflow
The problem was that I was changing my code from non-modules to modules and I forgot to delete the imported script file. My...
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' - Abhishek Kumar
In case you are getting error like 'Unexpected token export' while starting the server, then export like below in schema.js
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
I’m currently creating a nuxt plugin and got the same error. To fix it I added it to the list of deps prevented from being externalized for SSR.
@productdevbook You might need also to transpile the packages that are being imported by the package you’ve added to transpile. I’ve created a PR to help expose which packages they are: #1696.