training4developers / ng2-widgets-app

Angular 2 Widgets Sample Application
http://www.t4d.io
MIT License
0 stars 0 forks source link

Build fails from UglifyJs error #1

Open rjk opened 7 years ago

rjk commented 7 years ago

Same problem as https://github.com/training4developers/mastering-angular-starter/issues/3

ericwgreene commented 7 years ago

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 commented 7 years ago

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  (ng2-widgets-app@1.2.0)
λ npm i && npm start

> phantomjs-prebuilt@2.1.15 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

> node-sass@4.5.3 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

> node-sass@4.5.3 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: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1254 packages in 54.816s

> ng2-widgets-app@1.2.0 start C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master
> npm run prod

> ng2-widgets-app@1.2.0 prod C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master
> npm run clean && concurrently "npm run web-prod" "npm run rest"

> ng2-widgets-app@1.2.0 clean C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master
> rimraf dist

[0]
[0] > ng2-widgets-app@1.2.0 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] > ng2-widgets-app@1.2.0 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 typescript@2.5.3 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 commented 7 years ago

Rory,

I would use the Mastering Angular Starter project not ng2-widgets-app. I have not updated the ng2-widget-app in a long time. The link you clicked on to ng2-widget-app was incorrect. I intended to point to the starter project which you pointed out. And thank you for pointing it out, I have fixed it.

Use this repo, and let me know if you have any problems:

https://github.com/training4developers/mastering-angular-starter

Thanks!

Eric

From: Rory notifications@github.com Reply-To: training4developers/ng2-widgets-app reply@reply.github.com Date: Monday, October 23, 2017 at 14:23 To: training4developers/ng2-widgets-app ng2-widgets-app@noreply.github.com Cc: "Eric W. Greene" eric@ericwgreene.com, Comment comment@noreply.github.com Subject: Re: [training4developers/ng2-widgets-app] Build fails from UglifyJs error (#1)

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  (ng2-widgets-app@1.2.0) λ npm i && npm start

phantomjs-prebuilt@2.1.15 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

node-sass@4.5.3 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

node-sass@4.5.3 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: fsevents@1.1.2 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1254 packages in 54.816s

ng2-widgets-app@1.2.0 start C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master npm run prod

ng2-widgets-app@1.2.0 prod C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master npm run clean && concurrently "npm run web-prod" "npm run rest"

ng2-widgets-app@1.2.0 clean C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master rimraf dist

[0] [0] > ng2-widgets-app@1.2.0 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] > ng2-widgets-app@1.2.0 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 typescript@2.5.3 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. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ericwgreene commented 7 years ago

Hi Rory,

I just verified again on Windows using the latest Node.js, the mastering-angular-starter project installs and runs correctly. Did it work for you?

Thanks!

Eric

From: Rory notifications@github.com Reply-To: training4developers/ng2-widgets-app reply@reply.github.com Date: Monday, October 23, 2017 at 14:23 To: training4developers/ng2-widgets-app ng2-widgets-app@noreply.github.com Cc: "Eric W. Greene" eric@ericwgreene.com, Comment comment@noreply.github.com Subject: Re: [training4developers/ng2-widgets-app] Build fails from UglifyJs error (#1)

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  (ng2-widgets-app@1.2.0) λ npm i && npm start

phantomjs-prebuilt@2.1.15 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

node-sass@4.5.3 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

node-sass@4.5.3 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: fsevents@1.1.2 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1254 packages in 54.816s

ng2-widgets-app@1.2.0 start C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master npm run prod

ng2-widgets-app@1.2.0 prod C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master npm run clean && concurrently "npm run web-prod" "npm run rest"

ng2-widgets-app@1.2.0 clean C:\code\sandbox\ng2-widgets-app-master4\ng2-widgets-app-master rimraf dist

[0] [0] > ng2-widgets-app@1.2.0 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] > ng2-widgets-app@1.2.0 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 typescript@2.5.3 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. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

rjk commented 7 years ago

@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