简体   繁体   English

我需要哪些额外的装载机? (模块解析失败:意外令牌 (16:9))

[英]What additional loaders do I need? (Module parse failed: Unexpected token (16:9))

I am using a library called danfojs and it gives me the following error when I compiled.我正在使用一个名为danfojs的库,它在我编译时给了我以下错误。

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

Seems like I need to set up some additional loader maybe with webpack settings, could any one point me out the right direction of how to do that?似乎我需要使用 webpack 设置设置一些额外的加载程序,有人能指出如何做到这一点的正确方向吗?

You should not import /src/index.js from that lib: that is apparently source code with ES6 features, not supported by current Node.您不应该从该库中导入/src/index.js :这显然是具有 ES6 功能的源代码,当前 Node 不支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 模块解析失败:意外令牌。 您可能需要一个额外的加载器来处理这些加载器的结果 - Module parse failed: Unexpected token . You may need an additional loader to handle the result of these loaders 模块解析失败:意外令牌 (4:16) - Module parse failed: Unexpected token (4:16) react-script 4.0.3 显示模块解析失败:您可能需要一个额外的加载器来处理这些加载器的结果 - react-script 4.0.3 showing Module parse failed: You may need an additional loader to handle the result of these loaders Webpack@5 + angularJS + babel: Module parse failed: Unexpected token (2115:9),没有配置加载器来处理这个文件 - Webpack@5 + angularJS + babel: Module parse failed: Unexpected token (2115:9), no loaders are configured to process this file 模块解析失败:意外的令牌 - Module parse failed: Unexpected token React 和 NextJS:模块解析失败:意外的令牌 - React and NextJS: Module parse failed: Unexpected token 模块解析失败错误意外令牌}-Webpack - Module parse failed error Unexpected token } - Webpack 模块解析失败:意外的令牌离子3 - Module parse failed: Unexpected token ionic 3 React 模块解析失败:意外令牌 (1:48) - React Module parse failed: Unexpected token (1:48) 模块解析失败:意外令牌 (110:28) - Module parse failed: Unexpected token (110:28)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM