Build: web.js missing in @0.6.11-rc
Closed this issue · 2 comments
Seems that the UMD build made by browserify isn't included in the latest RC. Was trying out Vite with pocket-js to make sure there's compatibility with it, and when opening node_modules
it seems that it's not there.
However, if I use a lower version, like @0.6.3-rc
, I get no errors as I can see the web.js
umd script in node_modules
.
This means that @0.6.11-rc
cannot be used on web environments if the bundler tries to resolve an UMD build / doesn't transpile CJS to UMD/ESM.
I think the following is related to this issue.
When running browserify locally the following errors show up:
╰─$ npm run prepublishOnly
> @pokt-network/pocket-js@0.6.11-rc prepublishOnly /home/hartbeat/kitchen/pocket/client
> npm run build && npm run browserify
> @pokt-network/pocket-js@0.6.11-rc build /home/hartbeat/kitchen/pocket/client
> rm -rf dist & mkdir dist & cti create ./src & npm run lint & tsc
mkdir: cannot create directory ‘dist’: File exists
create succeeded: /home/hartbeat/kitchen/pocket/client/src
> @pokt-network/pocket-js@0.6.11-rc lint /home/hartbeat/kitchen/pocket/client
> tslint -p tsconfig.json
> @pokt-network/pocket-js@0.6.11-rc browserify /home/hartbeat/kitchen/pocket/client
> browserify browserify.js -p [ minifyify --no-map ] --standalone PocketJS > dist/web.js
WARN: Output exceeds 32000 characters
uglify-js failed on node_modules/scrypt-js/scrypt.js : SyntaxError: Unexpected token: name (h0)
WARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
uglify-js failed on node_modules/@pokt-network/amino-js/index.js : SyntaxError: Unexpected token: name (node)
uglify-js failed on node_modules/@tendermint/belt/index.js : SyntaxError: Unexpected token: name (node)
uglify-js failed on node_modules/@pokt-network/amino-js/dist/web.js : SyntaxError: Unexpected token: name (n)
uglify-js failed on node_modules/@pokt-network/amino-js/dist/node.js : SyntaxError: Unexpected token: name (n)
uglify-js failed on node_modules/asn1.js/lib/asn1/base/reporter.js : SyntaxError: Unexpected token: name (err)
uglify-js failed on node_modules/asn1.js/lib/asn1/base/node.js : SyntaxError: Unexpected token: name (result)
uglify-js failed on node_modules/asn1.js/lib/asn1/decoders/der.js : SyntaxError: Unexpected token: name (len)
uglify-js failed on node_modules/asn1.js/lib/asn1/decoders/pem.js : SyntaxError: Unexpected token: name (start)
uglify-js failed on node_modules/asn1.js/lib/asn1/encoders/der.js : SyntaxError: Unexpected token: name (lenOctets)
uglify-js failed on node_modules/asn1.js/lib/asn1/encoders/pem.js : SyntaxError: Unexpected token name «i», expected punc «;»
I think the following is related to this issue.
When running browserify locally the following errors show up:╰─$ npm run prepublishOnly > @pokt-network/pocket-js@0.6.11-rc prepublishOnly /home/hartbeat/kitchen/pocket/client > npm run build && npm run browserify > @pokt-network/pocket-js@0.6.11-rc build /home/hartbeat/kitchen/pocket/client > rm -rf dist & mkdir dist & cti create ./src & npm run lint & tsc mkdir: cannot create directory ‘dist’: File exists create succeeded: /home/hartbeat/kitchen/pocket/client/src > @pokt-network/pocket-js@0.6.11-rc lint /home/hartbeat/kitchen/pocket/client > tslint -p tsconfig.json > @pokt-network/pocket-js@0.6.11-rc browserify /home/hartbeat/kitchen/pocket/client > browserify browserify.js -p [ minifyify --no-map ] --standalone PocketJS > dist/web.js WARN: Output exceeds 32000 characters uglify-js failed on node_modules/scrypt-js/scrypt.js : SyntaxError: Unexpected token: name (h0) WARN: Output exceeds 32000 characters WARN: Output exceeds 32000 characters uglify-js failed on node_modules/@pokt-network/amino-js/index.js : SyntaxError: Unexpected token: name (node) uglify-js failed on node_modules/@tendermint/belt/index.js : SyntaxError: Unexpected token: name (node) uglify-js failed on node_modules/@pokt-network/amino-js/dist/web.js : SyntaxError: Unexpected token: name (n) uglify-js failed on node_modules/@pokt-network/amino-js/dist/node.js : SyntaxError: Unexpected token: name (n) uglify-js failed on node_modules/asn1.js/lib/asn1/base/reporter.js : SyntaxError: Unexpected token: name (err) uglify-js failed on node_modules/asn1.js/lib/asn1/base/node.js : SyntaxError: Unexpected token: name (result) uglify-js failed on node_modules/asn1.js/lib/asn1/decoders/der.js : SyntaxError: Unexpected token: name (len) uglify-js failed on node_modules/asn1.js/lib/asn1/decoders/pem.js : SyntaxError: Unexpected token: name (start) uglify-js failed on node_modules/asn1.js/lib/asn1/encoders/der.js : SyntaxError: Unexpected token: name (lenOctets) uglify-js failed on node_modules/asn1.js/lib/asn1/encoders/pem.js : SyntaxError: Unexpected token name «i», expected punc «;»
the failed messages don't affect the web.js and the functions we use, these messages have been here since day 1 of the webpack implementation, since amino-js is so big there is so much we don't use