Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module parse failed: Unexpected token #1

Open
bravepiper opened this issue May 20, 2022 · 2 comments
Open

Module parse failed: Unexpected token #1

bravepiper opened this issue May 20, 2022 · 2 comments

Comments

@bravepiper
Copy link

Hi, it failed when i run this dapp, the error is as following, could you please help point out how to correct this.

error in ./node_modules/web3modal-vue/src/providers/connectors/torus.js

Module parse failed: Unexpected token (19:44)
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
|
| const torus = new Torus({

            buttonPosition: opts.config?.buttonPosition || buttonPosition,

| apiKey: opts.config?.apiKey || apiKey,
| modalZIndex: opts.config?.modalZIndex || modalZIndex

@ ./node_modules/web3modal-vue/src/providers/connectors/index.js 5:0-28 14:0-27:2
@ ./node_modules/web3modal-vue/src/providers/index.js
@ ./node_modules/web3modal-vue/src/controllers/providers.js
@ ./node_modules/web3modal-vue/src/controllers/index.js
@ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/web3modal-vue/src/Web3ModalVue.vue?vue&type=script&lang=js&
@ ./node_modules/web3modal-vue/src/Web3ModalVue.vue?vue&type=script&lang=js&
@ ./node_modules/web3modal-vue/src/Web3ModalVue.vue
@ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/WalletConnect.vue?vue&type=script&lang=js&
@ ./src/components/WalletConnect.vue?vue&type=script&lang=js&
@ ./src/components/WalletConnect.vue
@ ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&
@ ./src/App.vue?vue&type=script&lang=js&
@ ./src/App.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.1.105:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

@vitorgamer58
Copy link
Owner

Strange, what command did you use?
What is your Node version?
Here everything worked perfectly in versions 14.17.3 and 16.14.2
Screenshot_6305

@vitorgamer58
Copy link
Owner

Maybe this can solve you problem: SmallRuralDog/web3modal-vue#4 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants