Uglify Error - Unexpected token punc «,», expected punc «:»
I'm using angular-seed with systemjs-builder and during build.prod process it stops on uglifying file angular-tree-component.umd.js.
If you paste code from this file here https://skalman.github.io/UglifyJS-online/
you can get the same result.
@version angular-tree-component 3.2.4
Parse error: Unexpected token punc «,», expected punc «:» Line 20349, column 14 20348: var array = { 20349: chunk, compact, concat, difference, differenceBy, 20350: differenceWith, drop, dropRight, dropRightWhile, dropWhile,
I'm getting a similar error during (karma) unit tests (see below).
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
SyntaxError: Unexpected token ','
at webpack:///~/angular-tree-component/dist/angular-tree-component.umd.js:20348:0 <- src/tests.entry.ts:153619
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
SyntaxError: Unexpected token ','
at webpack:///~/angular-tree-component/dist/angular-tree-component.umd.js:20348:0 <- src/tests.entry.ts:153619
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 0 ERROR (1.097 secs / 0 secs)
+1,
I resolved this issue by compiling angular-tree-component/dist/angular-tree-component.umd.js to es5, here is the steps:
- Go to angular-tree-component folder and rename
angular-tree-component.umd.jstoangular-tree-component.umd.ts. - Run
tsc angular-tree-component.umd.ts --module es2105 --target es5, - In
jspm.config.js,
map: {
...
"angular-tree-component": "npm:[email protected]/dist/angular-tree-component.umd.js",
...
}
BTW, to resolve this issue permanently, I think the 500tech team needs to generate an es5 file.
Hi @jgolebiewski , @sjdemoor , @chendachao ,
Can you try with the new version 3.3.0? BTW - in 3.3.0 the UMD bundle is already uglified.
Although I find this strange, it should be an ES5 file to begin with.
Hi, Now building process is Ok but durnig launch I'm getting this error
Module not already loaded loading "lodash/defaultsDeep" node_modules/angular-tree-component/dist/angular-tree-component.umd.js:2:27961
@jgolebiewski - error or warning?
Error
I now get the same error. Just ran npm update/install and now I can't start that application.
@myieye @jgolebiewski Yes I was able to reproduce using SystemJS. Will try to solve
I get the same error since the update 3.3.1
Error: Module not already loaded loading "lodash/defaultsDeep" node_modules/angular-tree-component/dist/angular-tree-component.umd.js:2:27961
I can't start my application anymore. Hope someone can provide a solution...
Also experiencing the same issue
Error: Module not already loaded loading "lodash/defaultsDeep"
Using SystemJS and angular-seed, having the same issue, been stuck on it for two days. Really hope someone provides any kind of solution.
See my comment in issue #262 for a workaround of the lodash/* issues.
We're using angular-seed, and there is no system.config.js file, but i tried adding variations of your lines from the comment in project-config, no luck...
Should be fixed in 3.4.1