Skip to content

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

@paulcoffee85

Description

@paulcoffee85

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions