In my project when i create Production Build then this error is occur plz give me suggestion to solve this issue.
when i create Development Build then there is no issue . This issue is occur when i ctreate Production Build.
TypeError: Cannot read property ‘length’ of undefined
at UglifyWriter.processFile (E:-------\node_modules\broccoli-uglify-sourcemap\index.js:112:67)
at E:--------\nod
e_modules\broccoli-uglify-sourcemap\index.js:65:16
at Array.forEach ()
at E:----------\nod
e_modules\broccoli-uglify-sourcemap\index.js:55:25
at Array.forEach ()
at UglifyWriter.build (E:--------\node_modules\broccoli-uglify-sourcemap\index.js:54:19)
at E:--------\nod
e_modules\broccoli-plugin\read_compat.js:93:34
at tryCatch (E:---------\node_modules\rsvp\dist\rsvp.js:526:12)
at invokeCallback (E:--------\node_modules\rsvp\dist\rsvp.js:540:13)
at publish (E:--------\node_modules\rsvp\dist\rsvp.js:508:7)
The broccoli plugin was instantiated at:
at Fingerprint.Plugin (E:------\node_modules\broccoli-plugin\index.js:7:31)
at Fingerprint.Filter [as constructor] (E:-----\node_modules\broccoli-filter\index.js:34:10)
at new Fingerprint (E:------\node_modules\broccoli-asset-rev\lib\fingerprint.js:21:10)
at Fingerprint (E:-------\node_modules\broccoli-asset-rev\lib\fingerprint.js:16:12)
at new AssetRev (E:------\node_modules\broccoli-asset-rev\lib\asset-rev.js:31:25)
at AssetRev (E:-------\node_modules\broccoli-asset-rev\lib\asset-rev.js:7:12)
at Class.postprocessTree (E:-------\node_modules\broccoli-asset-rev\index.js:31:40)
at projectOrAddon.addons.reduce (E:------\node_modules\ember-cli\lib\utilities\addon-process-tr
ee.js:6:25)
at Array.reduce ()
at addonProcessTree (E:------\node_modules\ember-cli\lib\utilities\addon-process-tree.js:4:32)
Hi derpy,
thanks for reply
As per your guidence i replace new EmberApp({ fingerprint: { enabled: false } }). But same issue after this changes. Production Build error.
and then in ember-cli-build class
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
// Add options here
‘ember-cli-uglify’: { enabled: false },
});
I can see that you are using E: drive, did it have enough space to run a production build correctly? Depends on your project, free space should be more than 2 or 3 GB.
I have resolved the issue , I had a config.js file containing simple javascript object in public directory and uglify was unable to process that file. I removed the extension from that file and it resolved the issue as uglify looks for js files.