Skip to content
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

Warning: Cannot read property 'srcRaw' of undefined Use --force to continue. #19

Closed
praveenvijayan opened this issue Jan 21, 2013 · 4 comments

Comments

@praveenvijayan
Copy link

grunt

Gruntfilejs

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    uglify: {
      options: {
        banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
      },
      dist: {
        src: ['js/main.js', 'js/plugin.js'],
        dest: '../dist/js/main.min.js'
      }
    }
  });

  // Load the plugin that provides the "uglify" task.
  grunt.loadNpmTasks('grunt-contrib-uglify');

  // Default task(s).
  grunt.registerTask('default', ['uglify']);

};

OS: Windows 32bit
grunt: "~0.4.0rc6
grunt-contrib-uglify: ~0.1.0

@nilsel
Copy link

nilsel commented Jan 21, 2013

Have you tried using grunt-contrib-uglify 0.1.1rc6?

using 0.1.0:
~/Sites/work/.../trunk ⮀ grunt
Running "uglify:dist" (uglify) task
Warning: Cannot read property 'srcRaw' of undefined Use --force to continue.

~/Sites/work/.../trunk ⮀npm install grunt-contrib-uglify@0.1.1rc6

~/Sites/work/.../trunk ⮀ grunt
Running "uglify:dist" (uglify) task
File "src/.../.../js/all-min.js" created.
Uncompressed size: 636101 bytes.
Compressed size: 148494 bytes gzipped (517688 bytes minified).

Done, without errors.

@praveenvijayan
Copy link
Author

Thanks @nilsel, grunt-contrib-uglify@0.1.1rc6 worked.

@netpoetica
Copy link

Thanks this is a good solve. Someone should put this on the README right away on the home page as this issue will be around for a little while I'm sure

@tkellen
Copy link
Member

tkellen commented Feb 17, 2013

Grunt 0.4 will be released on Monday, but for the next few hours, you can reference this ;)
http://github.com/gruntjs/grunt/wiki/Plugin-Release-Candidate-Versions

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

4 participants