我正在尝试将一个使用Browserify转换为普通Javascript的tensorflow.js文件(使用Node.js编写)。在文件中有两行代码
import * as tf from '@tensorflow/tfjs';
import {MnistData} from './data';
当我导出文件时,出现了错误“ParseError: 'import' and 'export' may appear only with 'sourceType: module'”。 我该如何解决这个错误?
提前致谢, Andi
.git
,然后执行git reset --hard
。 - Cadoiz