ES6 import/linter error
See original GitHub issueHi,
I just tried to install your library via NPM
npm install tippy.js
and import it like this:
import Tippy from 'tippy.js';
But I get a lint error after importing the lib. I’m using browserify for the bundling. Lint error looks like this:
SyntaxError: Unexpected token (4:7) while parsing /node_modules/tippy.js/src/js/tippy.js while parsing file: /node_modules/tippy.js/src/js/tippy.js
at DestroyableTransform.end [as _flush] (/node_modules/insert-module-globals/index.js:96:21)
at DestroyableTransform.<anonymous> (/node_modules/readable-stream/lib/_stream_transform.js:115:49)
...
After changing the path in your package.json for “main” to “dist/tippy.js” it works. But I don’t think that’s the way you would like to have it.
Cheers Stefan
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
How to fix “only available in ES6” linter errors? - Stack Overflow
I am trying to add a linter to my Express application and am getting several linter errors about ES6, i.e. 'export' is only...
Read more >no-restricted-imports - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >JavaScript modules - MDN Web Docs
If you don't, you'll get a strict MIME type checking error along the ... AMD module systems (as explained nicely in ES6 In...
Read more >50 shades of ES6 modules - JavaScript in Plain English
you will never hear that it's ES6 modules. ... JS: 50 shade of ES6 Modules. ... The quiz code throws the following error:....
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

For those using Tippy.js 6.x, similar to the advice above, just use this:
Thanks! Really appreciate your work!