Skip to content

Build fails from UglifyJs error #1

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

Open
rjk opened this issue Oct 19, 2017 · 5 comments
Open

Build fails from UglifyJs error #1

rjk opened this issue Oct 19, 2017 · 5 comments

Comments

@rjk
Copy link

rjk commented Oct 19, 2017

Same problem as training4developers/mastering-angular-starter#3

@ericwgreene
Copy link
Contributor

I just pulled down a fresh copy from GitHub and it seems to 'npm install' and 'npm start' correctly. Could you please post some additional details about your version of Node and NPM. What operating system and any other error output? Thanks!

@rjk
Copy link
Author

rjk commented Oct 23, 2017

I'm new to this so could be my environment. I checked just now and got the same error but was on node v6 so I upgraded to v8 and still get it. Current environment is Node v8.7.0, NPM v5.4.2, I'm running on Windows 10 x64 within cmd.exe (ie not the Linux subsystem). This is with a freshly-downloaded zip of this repo from today.

The error is:

[0] ERROR in polyfills.010368b85591829e02c4.js from UglifyJs
[0] Unexpected token: name (urlParts) [(webpack)-dev-server/client?http:/localhost:5000:24,0][polyfills.010368b85591829e02c4.js:1533,4]
[0] Child html-webpack-plugin for "index.html":
[0]     chunk    {0} index.html 541 kB [entry] [rendered]
[0]         [0] ./~/lodash/lodash.js 540 kB {0} [built]
[0]         [1] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 642 bytes {0} [built]
[0]         [2] (webpack)/buildin/global.js 509 bytes {0} [built]
[0]         [3] (webpack)/buildin/module.js 517 bytes {0} [built]
[0] webpack: Failed to compile.

Here's the full output:

C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master  ([email protected])
λ npm i && npm start

> [email protected] install C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master\node_modules\phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Download already available at C:\Users\roryk\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master\node_modules\phantomjs-prebuilt\lib\phantom
Copying extracted folder C:\Users\roryk\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip-extract-1508793087094\phantomjs-2.1.1-windows -> C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master\node_modules\phantomjs-prebuilt\lib\phantom
Writing location.js file
Done. Phantomjs binary available at C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe

> [email protected] install C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master\node_modules\node-sass
> node scripts/install.js

Cached binary found at C:\Users\roryk\AppData\Roaming\npm-cache\node-sass\4.5.3\win32-x64-57_binding.node

> [email protected] postinstall C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master\node_modules\node-sass
> node scripts/build.js

Binary found at C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1254 packages in 54.816s

> [email protected] start C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master
> npm run prod


> [email protected] prod C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master
> npm run clean && concurrently "npm run web-prod" "npm run rest"


> [email protected] clean C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master
> rimraf dist

[0]
[0] > [email protected] web-prod C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master
[0] > webpack-dev-server --config ./config/webpack.prod.js
[0]
[1]
[1] > [email protected] rest C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master
[1] > json-server --watch --port 3010 db.json
[1]
[1]
[1]   \{^_^}/ hi!
[1]
[1]   Loading db.json
[1]   Done
[1]
[1]   Resources
[1]   http://localhost:3010/owners
[1]   http://localhost:3010/widgets
[1]   http://localhost:3010/people
[1]   http://localhost:3010/authors
[1]   http://localhost:3010/books
[1]
[1]   Home
[1]   http://localhost:3010
[1]
[1]   Type s + enter at any time to create a snapshot of the database
[1]   Watching...
[1]
[0] Project is running at http://localhost:5000/
[0] webpack output is served from /
[0] Content not from webpack is served from dist
[0] 404s will fallback to /index.html
[0] ts-loader: Using [email protected] and C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master\tsconfig.json
[0] Hash: 010368b85591829e02c4
[0] Version: webpack 2.7.0
[0] Time: 29753ms
[0]                                 Asset       Size  Chunks                    Chunk Names
[0]        vendor.010368b85591829e02c4.js    1.31 MB       0  [emitted]  [big]  vendor
[0]           app.010368b85591829e02c4.js    21.1 kB       1  [emitted]         app
[0]     polyfills.010368b85591829e02c4.js     633 kB       2  [emitted]  [big]  polyfills
[0]    vendor.010368b85591829e02c4.js.map    10.4 MB       0  [emitted]         vendor
[0]       app.010368b85591829e02c4.js.map    86.7 kB       1  [emitted]         app
[0] polyfills.010368b85591829e02c4.js.map     800 kB       2  [emitted]         polyfills
[0]                images/placeholder.txt   27 bytes          [emitted]
[0]                            index.html  507 bytes          [emitted]
[0] chunk    {0} vendor.010368b85591829e02c4.js, vendor.010368b85591829e02c4.js.map (vendor) 3.77 MB {2} [initial] [rendered]
[0]     [1] ./~/@angular/core/index.js 2.54 kB {0} [built]
[0]    [21] ./~/rxjs/_esm5/Subscription.js 8.09 kB {0} [built]
[0]   [108] ./~/@angular/common/index.js 793 bytes {0} [built]
[0]   [128] ./~/@angular/platform-browser/index.js 635 bytes {0} [built]
[0]   [129] ./~/@angular/router/index.js 909 bytes {0} [built]
[0]   [249] ./~/@angular/http/index.js 734 bytes {0} [built]
[0]   [372] ./~/@angular/forms/index.js 1.04 kB {0} [built]
[0]   [385] ./~/@angular/platform-browser-dynamic/index.js 395 bytes {0} [built]
[0]   [567] ./src/ts/vendor.ts 464 bytes {0} [built]
[0]   [683] ./~/bootstrap-loader/loader.js 63 bytes {0} [built]
[0]   [873] ./~/rxjs/_esm5/Rx.js 8.27 kB {0} [built]
[0]   [996] ./~/rxjs/_esm5/add/operator/window.js 251 bytes {0} [built]
[0]   [997] ./~/rxjs/_esm5/add/operator/windowCount.js 281 bytes {0} [built]
[0]   [998] ./~/rxjs/_esm5/add/operator/windowTime.js 275 bytes {0} [built]
[0]  [1218] multi (webpack)-dev-server/client?http://localhost:5000 ./vendor.ts 40 bytes {0} [built]
[0]      + 875 hidden modules
[0] chunk    {1} app.010368b85591829e02c4.js, app.010368b85591829e02c4.js.map (app) 35.3 kB {0} [initial] [rendered]
[0]   [562] ./src/ts/app/widgets/widget-editor/widget-editor.component.ts 2.92 kB {1} [built]
[0]   [563] ./src/ts/app/widgets/widget-viewer/widget-viewer.component.ts 2.31 kB {1} [built]
[0]   [564] ./src/ts/app/widgets/widgets-viewer/widgets-viewer.component.ts 2.17 kB {1} [built]
[0]   [565] ./src/ts/main.ts 757 bytes {1} [built]
[0]  [1197] ./src/scss/styles.scss 1.21 kB {1} [built]
[0]  [1198] ./src/ts/app/app.component.ts 1.31 kB {1} [built]
[0]  [1199] ./src/ts/app/app.module.ts 3.05 kB {1} [built]
[0]  [1200] ./src/ts/app/app.routes.ts 780 bytes {1} [built]
[0]  [1201] ./src/ts/app/pipes/active.pipe.ts 1.05 kB {1} [built]
[0]  [1202] ./src/ts/app/pipes/capitalize.pipe.ts 1.17 kB {1} [built]
[0]  [1203] ./src/ts/app/shared/page-footer/page-footer.component.ts 1.53 kB {1} [built]
[0]  [1204] ./src/ts/app/shared/page-header/page-header.component.ts 1.53 kB {1} [built]
[0]  [1205] ./src/ts/app/widgets/shared/widget-details/widget-details.component.ts 1.58 kB {1} [built]
[0]  [1207] ./src/ts/app/widgets/shared/widgets-table/widgets-table.component.ts 2.2 kB {1} [built]
[0]  [1216] multi (webpack)-dev-server/client?http://localhost:5000 ./main.ts 40 bytes {1} [built]
[0]      + 24 hidden modules
[0] chunk    {2} polyfills.010368b85591829e02c4.js, polyfills.010368b85591829e02c4.js.map (polyfills) 596 kB [entry] [rendered]
[0]    [35] (webpack)/buildin/global.js 509 bytes {2} [built]
[0]   [107] (webpack)-dev-server/client?http://localhost:5000 7.95 kB {2} [built]
[0]   [566] ./src/ts/polyfills.ts 365 bytes {2} [built]
[0]   [684] ./~/core-js/es6/index.js 5.88 kB {2} [built]
[0]   [685] ./~/core-js/es7/reflect.js 510 bytes {2} [built]
[0]   [715] ./~/core-js/modules/es6.array.slice.js 929 bytes {2} [built]
[0]   [855] ./~/loglevel/lib/loglevel.js 7.74 kB {2} [built]
[0]  [1195] ./~/strip-ansi/index.js 161 bytes {2} [built]
[0]  [1208] ./~/url/url.js 23.3 kB {2} [built]
[0]  [1210] (webpack)-dev-server/client/overlay.js 3.73 kB {2} [built]
[0]  [1211] (webpack)-dev-server/client/socket.js 1.05 kB {2} [built]
[0]  [1213] (webpack)/hot nonrecursive ^\.\/log$ 160 bytes {2} [built]
[0]  [1214] (webpack)/hot/emitter.js 77 bytes {2} [built]
[0]  [1215] ./~/zone.js/dist/zone.js 88.7 kB {2} [built]
[0]  [1217] multi (webpack)-dev-server/client?http://localhost:5000 ./polyfills.ts 40 bytes {2} [built]
[0]      + 275 hidden modules
[0]
[0] ERROR in polyfills.010368b85591829e02c4.js from UglifyJs
[0] Unexpected token: name (urlParts) [(webpack)-dev-server/client?http:/localhost:5000:24,0][polyfills.010368b85591829e02c4.js:1533,4]
[0] Child html-webpack-plugin for "index.html":
[0]     chunk    {0} index.html 541 kB [entry] [rendered]
[0]         [0] ./~/lodash/lodash.js 540 kB {0} [built]
[0]         [1] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 642 bytes {0} [built]
[0]         [2] (webpack)/buildin/global.js 509 bytes {0} [built]
[0]         [3] (webpack)/buildin/module.js 517 bytes {0} [built]
[0] webpack: Failed to compile.

@ericwgreene
Copy link
Contributor

ericwgreene commented Oct 24, 2017 via email

@ericwgreene
Copy link
Contributor

ericwgreene commented Oct 25, 2017 via email

@rjk
Copy link
Author

rjk commented Oct 26, 2017

@ericwgreene - yes the other repo mastering-angular-starter works fine for me. I'm only using that one, I just raised this issue as I noticed it accidentally by following that wrong link. Feel free to close this issue if you like, it doesn't matter to me at all as I'm not using this repo.

thanks!

Rory

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