javascriptdata / danfojs

Danfo.js is an open source, JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.
https://danfo.jsdata.org/
MIT License
4.81k stars 209 forks source link

Failed to compile issue when loading the module in React #191

Closed tonyabracadabra closed 3 years ago

tonyabracadabra commented 3 years ago
./node_modules/danfojs/src/index.js 16:9
Module parse failed: Unexpected token (16:9)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| export { Str } from "./core/strings";
| export { Utils } from "./core/utils";
> export * as tf from "@tensorflow/tfjs";
| export const _version = "0.2.5";

After reading this (https://github.com/tensorflow/tfjs/issues/1333), I manually changed the file src/index.js from

export * as tf from "@tensorflow/tfjs";

to

import * as tf from "@tensorflow/tfjs";
...
export { tf };

It works for me now. Would we consider changing that?

risenW commented 3 years ago

Thanks @tonyabracadabra This has been updated in the latest release