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

One problem on build dsteem #45

Open
sityck opened this issue Apr 16, 2019 · 0 comments
Open

One problem on build dsteem #45

sityck opened this issue Apr 16, 2019 · 0 comments

Comments

@sityck
Copy link

sityck commented Apr 16, 2019

I am trying to build the dsteem.
but when use 'npm run prepublishOnly' ,It report an error:

$ npm run prepublishOnly

> @steemit/dsteem@0.10.2 prepublishOnly /home/sdu/web/dsteem
> make all

tsc -p tsconfig.json --outDir lib && \
VERSION="$(node -p 'require("./package.json").version')"; \
echo "module.exports = '${VERSION}';" > lib/version.js
touch lib
browserify src/index-browser.ts --debug --full-paths \
	--standalone dsteem --plugin tsify \
	--transform [ babelify --extensions .ts ] \
	| derequire > dist/dsteem.js
uglifyjs dist/dsteem.js \
	--source-map "content=inline,url=dsteem.js.map,filename=dist/dsteem.js.map" \
	--compress "dead_code,collapse_vars,reduce_vars,keep_infinity,drop_console,passes=2" \
	--output dist/dsteem.js || rm dist/dsteem.js

Parse error at dist/dsteem.js:3078,0
const Buffer = _dereq_('safe-buffer').Buffer
^
ERROR: Unexpected token: keyword (const)
    at JS_Parse_Error.get (eval at <anonymous> (/home/sdu/web/dsteem/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)
    at fatal (/home/sdu/web/dsteem/node_modules/uglify-js/bin/uglifyjs:291:53)
    at run (/home/sdu/web/dsteem/node_modules/uglify-js/bin/uglifyjs:235:9)
    at Object.<anonymous> (/home/sdu/web/dsteem/node_modules/uglify-js/bin/uglifyjs:160:5)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
gzip -9 -f -c dist/dsteem.js > dist/dsteem.js.gz
gzip: dist/dsteem.js: No such file or directory
Makefile:32: recipe for target 'dist/dsteem.js.gz' failed
make: *** [dist/dsteem.js.gz] Error 1
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @steemit/dsteem@0.10.2 prepublishOnly: `make all`
npm ERR! Exit status 2

Does anyone know how to fix it?
I hava not changed the code of dsteem,
OR , Is there another way to build dsteem with dsteem.js?

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

1 participant