Enyo deploy.sh error - TypeError: Cannot read property 'length' of undefined

edited August 2013 in Enyo 2
$ ./tools/deploy.sh
enyo/tools/minify.sh args: 
Minify-ing Enyo...
Minify-ing the application...
Error: Fail: '"node" "/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/minify.js" "-enyo" "/Users/jameserbes/Play/enyojs/birdlist10/enyo" "-output" "/Users/jameserbes/Play/enyojs/birdlist10/build/app" "-less" "-no-beautify" "package.js"'
{ enyo: '/Users/jameserbes/Play/enyojs/birdlist10/enyo',
  output: '/Users/jameserbes/Play/enyojs/birdlist10/build/app',
  less: true,
  beautify: false,
  argv: 
   { remain: [ 'package.js' ],
     cooked: 
      [ '--enyo',
        '/Users/jameserbes/Play/enyojs/birdlist10/enyo',
        '--output',
        '/Users/jameserbes/Play/enyojs/birdlist10/build/app',
        '-less',
        '-no-beautify',
        'package.js' ],
     original: 
      [ '-enyo',
        '/Users/jameserbes/Play/enyojs/birdlist10/enyo',
        '-output',
        '/Users/jameserbes/Play/enyojs/birdlist10/build/app',
        '-less',
        '-no-beautify',
        'package.js' ] },
  source: 'package.js' }


>>>>>>>>>>> Add path aliases to the mapped sources
undefined
undefined
TypeError: Cannot read property 'length' of undefined
    at walkerFinished (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/minify.js:183:32)
    at processNextChunk (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/minify.js:173:5)
    at walkerFinished (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/minify.js:176:3)
    at Object.module.exports.walk.loader.finish (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:61:4)
    at Object.enyo.loaderFactory.more (eval at  (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:12:10))
    at Object.enyo.loaderFactory.load (eval at  (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:12:10))
    at Object.module.exports.init.enyo.depends (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:55:16)
    at eval (eval at  (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:12:10))
    at script (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:12:2)
    at Object.module.exports.walk (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:63:3)
Error: Fail: '"node" "/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/minify.js" "-enyo" "/Users/jameserbes/Play/enyojs/birdlist10/enyo" "-output" "/Users/jameserbes/Play/enyojs/birdlist10/build/app" "-less" "-no-beautify" "package.js"'
{ enyo: '/Users/jameserbes/Play/enyojs/birdlist10/enyo',
  output: '/Users/jameserbes/Play/enyojs/birdlist10/build/app',
  less: true,
  beautify: false,
  argv: 
   { remain: [ 'package.js' ],
     cooked: 
      [ '--enyo',
        '/Users/jameserbes/Play/enyojs/birdlist10/enyo',
        '--output',
        '/Users/jameserbes/Play/enyojs/birdlist10/build/app',
        '-less',
        '-no-beautify',
        'package.js' ],
     original: 
      [ '-enyo',
        '/Users/jameserbes/Play/enyojs/birdlist10/enyo',
        '-output',
        '/Users/jameserbes/Play/enyojs/birdlist10/build/app',
        '-less',
        '-no-beautify',
        'package.js' ] },
  source: 'package.js' }


>>>>>>>>>>> Add path aliases to the mapped sources
undefined
undefined
TypeError: Cannot read property 'length' of undefined
    at walkerFinished (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/minify.js:183:32)
    at processNextChunk (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/minify.js:173:5)
    at walkerFinished (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/minify.js:176:3)
    at Object.module.exports.walk.loader.finish (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:61:4)
    at Object.enyo.loaderFactory.more (eval at  (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:12:10))
    at Object.enyo.loaderFactory.load (eval at  (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:12:10))
    at Object.module.exports.init.enyo.depends (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:55:16)
    at eval (eval at  (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:12:10))
    at script (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:12:2)
    at Object.module.exports.walk (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/minifier/node_modules/walker.js:63:3)

    at run (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/deploy.js:178:9)
    at Object. (/Users/jameserbes/Play/enyojs/birdlist10/enyo/tools/deploy.js:227:1)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:245:9)

Comments

  • edited August 2013
    I added logging: minify.js:176
                    processNextChunk(function() {
                            if (topDepends) {
                                    var js = "";
                                    // Add path aliases to the mapped sources
                                    console.log(">>>>>>>>>>> Add path aliases to the mapped sources")
                                    console.log(opt.mapfrom)
                                    console.log(opt.mapto)
                                    for (var i=0; i
  • The problem isn't that opt.mapfrom and opt.mapto are undefined. This is normal if you invoke the deploy script without the remote source mapping arguments. The problem seems to be that topDepends is being set to a non-empty value when it shouldn't be due to unexpected input to the walkerFinished callback. I would add some logging to find out what the script thinks chunks is at line 136. If it's not an array with only 1 element that is an object, then you can work backwards from there to figure out why.
Sign In or Register to comment.