Danfojs not working with Vue(v2)
See original GitHub issueHi, Team
When I try using Vue(V2) and danfojs. I allways get the error "Module parse failed: Unexpected token (17:9) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | export { Str } from “./core/strings”; | export { Utils } from “./core/utils”;
export * as tf from “@tensorflow/tfjs”; | | export const _version = “0.2.2”;" when trying to import danfojs.
Does anybody know where the Problem is or what I can do to fix this?
`<template>
<div>Pandas
{{ df.head().print() }}
</div>
</template>
<script>
import * as df from 'danfojs/danfojs/src/index';
export default {
name: 'Pandas',
data() {
return {
df: []
};
},
created() {
this.df = new df.DataFrame(
{ pig: [20, 18, 489, 675, 1776], horse: [4, 25, 281, 600, 1900] },
{ index: [1990, 1997, 2003, 2009, 2014] }
);
},
}
</script>"`Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Danfojs not working with Vue(v2) · Issue #128 - GitHub
When I try using Vue(V2) and danfojs. I allways get the error "Module parse failed: Unexpected token (17:9) You may need an appropriate...
Read more >Getting Started - JavaScript
We will show you how to use danfo.js in a browser, client-side libraries, and Node.js environments. Most functions except plotting which require a...
Read more >How to import NPM package in vue 3 (Danfo.js) - Stack Overflow
npm install danfojs. is for the browser clients. I consume the library as follows - import {DataFrame} from 'danfojs/dist/core/frame'; ...
Read more >danfojs - npm
JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.
Read more >[Solved]-How to import NPM package in vue 3 (Danfo.js)
Why isn't Vue rendering this space? A bug? Inserting VueJS component template in HTML page not working · v-if not rendering when state...
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

I have the same issue. If I change this line to an import and move it to line 2 then add
export { tf };on line 18, it appears to work normally.I am using Vue 2.6.11.
Thank you everyone.
I fixed it by @gaw89 and especially thank you to @gaw89