WalletConnect / walletconnect-monorepo

WalletConnect Monorepo
Apache License 2.0
1.41k stars 691 forks source link

Webpack Error #441

Closed ochikov closed 1 year ago

ochikov commented 3 years ago

Hello, Since a few days ago, this error start to encounter and I cannot use the package anymore:

ERROR in ./~/eth-json-rpc-filters/~/pify/index.js
Module parse failed: /ProjectPath/node_modules/eth-json-rpc-filters/node_modules/pify/index.js Unexpected token (44:2)
You may need an appropriate loader to handle this file type.
|               errorFirst: true,
|               promiseModule: Promise,
|               ...options
|       };
| 
 @ ./~/eth-json-rpc-filters/log-filter.js 8:11-26
 @ ./~/eth-json-rpc-filters/index.js
 @ ./~/web3-provider-engine/subproviders/filters.js
 @ ./~/@walletconnect/web3-provider/dist/cjs/index.js
 @ ./src/layouts/app-layout/AppLayout.js
 @ ./src/routes/index.js
 @ ./src/main.js
 @ multi ./src/main webpack-hot-middleware/client.js?path=/__webpack_hmr
justinGrosvenor commented 3 years ago

I'm getting the same error

cjoshi85 commented 3 years ago

I am getting the same issue. Can you please let me know how to solve it?

shayelbaz1 commented 3 years ago

Same Here....

ochikov commented 3 years ago

You just need to load a proper plugin in webpack, that works with destructuring.

michjun commented 2 years ago

Does anyone know how to solve this

florinbardosi commented 2 years ago

Any solution for this?

505969733 commented 2 years ago

how to fix ?

Daudxu commented 2 years ago

Any solution for this?

ShevaShen commented 2 years ago

The issue is with the Object spread operator since javascript es6, pify/index.js is using it.

Depends on your webpack configuration, you will have to do something to compile it. e.g. for babel-loader user, can look into a lib like this https://babeljs.io/docs/en/babel-plugin-proposal-object-rest-spread

Bommer2078 commented 2 years ago

问题在于对象扩展运算符,因为 javascript es6pify/index.js正在使用它。

取决于您的webpack配置,您将不得不做一些事情来编译它。例如对于babel-loader用户,可以查看这样的库https://babeljs.io/docs/en/babel-plugin-proposal-object-rest-spread

你好, 从前几天开始出现这个错误,我不能再使用这个包了:

ERROR in ./~/eth-json-rpc-filters/~/pify/index.js
Module parse failed: /ProjectPath/node_modules/eth-json-rpc-filters/node_modules/pify/index.js Unexpected token (44:2)
You may need an appropriate loader to handle this file type.
|               errorFirst: true,
|               promiseModule: Promise,
|               ...options
|       };
| 
 @ ./~/eth-json-rpc-filters/log-filter.js 8:11-26
 @ ./~/eth-json-rpc-filters/index.js
 @ ./~/web3-provider-engine/subproviders/filters.js
 @ ./~/@walletconnect/web3-provider/dist/cjs/index.js
 @ ./src/layouts/app-layout/AppLayout.js
 @ ./src/routes/index.js
 @ ./src/main.js
 @ multi ./src/main webpack-hot-middleware/client.js?path=/__webpack_hmr

Hi have you fixed this bugs?

Bommer2078 commented 2 years ago

Did you find way? please help me

finessevanes commented 1 year ago

@ochikov @Bommer2078 is this still an issue?