Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

grunt.task has no taskError property #28

Closed
wants to merge 1 commit into from

Conversation

pismute
Copy link
Contributor

@pismute pismute commented Aug 2, 2013

I have got another error:

$ grunt --stack crx
Running "crx:dev" (crx) task
Fatal error: undefined is not a function
TypeError: undefined is not a function
    at .../node_modules/grunt-crx/lib/crx.js:61:19
    at null.<anonymous> (.../node_modules/grunt-crx/node_modules/crx/src/crx.js:39:27)
    at null.<anonymous> (.../node_modules/grunt-crx/node_modules/crx/src/crx.js:112:26)
    at ChildProcess.exithandler (child_process.js:641:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

You could get mime:

  1. remove your 'zip' command
  2. git clone https://github.com/pismute/ladybucks.git
  3. cd ladybucks;npm install
  4. grunt --stack

grunt.task has no taskError function. I think we can use this function in test only. I am not sure this problem, but It works.

ps> I have an another question. I have got this error if I installed grunt-crx from npm repository. but I cannot get error if I install from local disk using 'npm link grunt-crx'. I cannot understand why...

Thank you.

@thom4parisot
Copy link
Owner

Oh it must be a legacy from grunt 0.3 or something in the early grunt 0.4.

grunt.fail.fatal should be better than throwing a pure error.

Could you replace throw new grunt.task.taskError(err); by grunt.fail.fatal(err)?

@thom4parisot
Copy link
Owner

I fixed it in a697f2f. Let me know if this is causing trouble :-)

@pismute
Copy link
Contributor Author

pismute commented Aug 2, 2013

Thank you!

Does it still need 'throw new'? grunt.fail.fatal makes grunt shutdowned.
Could you tell me why it does?

thom4parisot added a commit that referenced this pull request Aug 2, 2013
@thom4parisot
Copy link
Owner

Yes, it's definitely not needed. I have even not followed my own instructions ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants