"Unexpected token import" from npm modules
See original GitHub issueDescribe the issue / bug.
When I try to install some npm modules, like vue-good-table or vuejs-datatables and I import them the error is an “unexpected token import”.
How can I reproduce this problem?
For example we can use vue good table.
npm install --save vue-good-table- In
router/index.js(it’s probably the wrong place). The error will appear in the console of DevTools:
import VueGoodTable from 'vue-good-table';
Vue.use(VueGoodTable);
Tell me about your development environment.
- Node version: 8.0.0
- NPM version: 5.0.3
- Operating System: Ubuntu
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Node.js - SyntaxError: Unexpected token import - Stack Overflow
Node.js - SyntaxError: Unexpected token import · 4. Use transpiler like Babel to use import in Nodejs as it is not natively supported...
Read more >SyntaxError:Unexpected token while importing npm module
These modules are scripted in typescript and packaged using yarn build (babel loader is used). We want to import one of the modules...
Read more >Unexpected token import Node.js - Reactgo
In this tutorial, we are going to learn about how to resolve the unexpected token import error in Node.js. When we use es6...
Read more >SyntaxError: Unexpected token import in Node.js | bobbyhadz
The "SyntaxError: Unexpected token import" occurs when we use the ES6 import syntax in a version of Node that doesn't support it. To...
Read more >Error Unexpected token import in nodejs | Edureka Community
Unfortunately, Node.js doesn't support ES6's import yet. To accomplish what you're trying to do (import the Express module), this code should ...
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 Free
Top 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

In your renderer config, have you whitelisted them like:
@0libre
.electron-vue/webpack.renderer.config.js (L21)