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

SyntaxError: Unexpected token (53:4) while parsing #2054

Open
paulcoffee85 opened this issue Mar 13, 2023 · 1 comment
Open

SyntaxError: Unexpected token (53:4) while parsing #2054

paulcoffee85 opened this issue Mar 13, 2023 · 1 comment

Comments

@paulcoffee85
Copy link

The error whenever trying to use command:

$ yarn browserify index.js --standalone bundle -o ./dist/bundle.js
with file that has const { ethers } = require("ethers"); in it. Otherwise how do you add that require after process if possible ??

$ C:\Users\paulc\ConnectSmartContracts2MM\node_modules\.bin\browserify index.js --standalone bundle -o ./dist/bundle.js
SyntaxError: Unexpected token (53:4) while parsing C:\Users\paulc\ConnectSmartContracts2MM\node_modules\ethers\lib.commonjs\abi\fragments.js while parsing file: C:\Users\paulc\ConnectSmartContracts2MM\node_modules\ethers\lib.commonjs\abi\fragments.js
    at DestroyableTransform.end [as _flush] (C:\Users\paulc\ConnectSmartContracts2MM\node_modules\insert-module-globals\index.js:114:21)
    at DestroyableTransform.prefinish (C:\Users\paulc\ConnectSmartContracts2MM\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:138:10)
    at DestroyableTransform.emit (node:events:513:28)
    at prefinish (C:\Users\paulc\ConnectSmartContracts2MM\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:619:14)
    at finishMaybe (C:\Users\paulc\ConnectSmartContracts2MM\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:627:5)
    at endWritable (C:\Users\paulc\ConnectSmartContracts2MM\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:638:3)
    at Writable.end (C:\Users\paulc\ConnectSmartContracts2MM\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:594:22)
    at DestroyableTransform.onend (C:\Users\paulc\ConnectSmartContracts2MM\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:577:10)
    at Object.onceWrapper (node:events:627:28)
    at DestroyableTransform.emit (node:events:525:35)
@paulcoffee85
Copy link
Author

Nevermind, if someone had frick'n mentioned watchify, half the errors would have never appeared

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

No branches or pull requests

1 participant