Module parse failed: Unexpected token
Closed this issue · 0 comments
ncnnnnn commented
node 12.x--20.x
编译出现类似好几个错误
error in ./node_modules/web3-utils/node_modules/@ethereumjs/util/dist/bytes.js
Module parse failed: Unexpected token (329:36)
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
| function bufArrToArr(arr) {
| if (!Array.isArray(arr)) {
> return Uint8Array.from(arr ?? []);
| }
| return arr.map((a) => bufArrToArr(a));
应该是 ?? 支持问题,不知道应该修改哪里?谢谢。