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

npm run build: SyntaxError: Unexpected token: operator (>) #175

Closed
selfup opened this issue Sep 20, 2016 · 2 comments
Closed

npm run build: SyntaxError: Unexpected token: operator (>) #175

selfup opened this issue Sep 20, 2016 · 2 comments

Comments

@selfup
Copy link

selfup commented Sep 20, 2016

First of all, thank you for such a great tool!


Started the project with: vue init browserify project-name
Everything works fine with npm run watchify as well as npm run dev
Here is the Repo: https://github.com/selfup/vue-reegux-example-repo

Which uses: https://github.com/selfup/vue-reegux (a state manager I made. So it could potentially be the install method I expose)


vue -V => 2.3.1
node v6.6.0
npm v3.10.8


Once I npm run build

> vue-reegux-example-repo@ build /Users/RJPB2/VUE/vue-reegux-example-repo
> cross-env NODE_ENV=production browserify -g envify -p [ vueify/plugins/extract-css -o dist/build.css ] -e src/main.js | uglifyjs -c warnings=false -m > dist/build.js

Parse error at -:185,40
SyntaxError: Unexpected token: operator (>)
Error
    at new JS_Parse_Error (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1545:18)
    at js_error (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1553:11)
    at croak (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2092:9)
    at token_error (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2100:9)
    at unexpected (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2106:9)
    at expr_atom (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2633:9)
    at maybe_unary (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2795:19)
    at expr_ops (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2830:24)
    at maybe_conditional (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2835:20)
    at maybe_assign (eval at <anonymous> (/Users/RJPB2/VUE/vue-reegux-example-repo/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2859:20)
@selfup selfup changed the title npm run build uglifyjs SyntaxError: Unexpected token: operator (>) npm run build: SyntaxError: Unexpected token: operator (>) Sep 20, 2016
@egoist
Copy link
Collaborator

egoist commented Oct 1, 2016

The main entry of your vue-reegux is written in ES6, use a compiled version instead. Browserify does not seem to transform modules in node_modules/* by default, but here's some alternative babel/babelify#53

@selfup
Copy link
Author

selfup commented Oct 1, 2016

@egoist Thank you so much. That makes complete sense!

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