3

I've written a node.js app that works great locally, but when I push to heroku, I get the following error:

2012-04-11T00:42:55+00:00 app[web.1]:         throw e; // process.nextTick error, or 'error' event on first tick
2012-04-11T00:42:55+00:00 app[web.1]:         ^
2012-04-11T00:42:55+00:00 app[web.1]: TypeError: Object #<Object> has no method 'isArray'

I've figured out that heroku's Node is v0.4.7, but mine locally is v0.6.3. I'm specifying to use v0.6.3 in my package.json file:

"engine": {  
    "node": "0.6.3"  
  , "npm": "1.1.9"
}

But that's obviously not doing anything, even after I push.

This has been bothering me all day, and all I need to do is figure out how to get the util.isArray() method working again (hopefully). That's the error I'm getting, and it's because that's not supported in v0.4.7 of node.

2
  • 1
    If all else fails, you can use if (arr instanceof Array) to determine if arr is an array. Commented Apr 11, 2012 at 1:59
  • Hey @CaseyChu, I know - I just don't want to do that because it's a NPM module that's giving this error, and I don't want to have to clone the module, use a relative version of it, etc. It'd be much more convenient to make node be the correct version I want. Commented Apr 11, 2012 at 2:01

1 Answer 1

2

Note that you're using engine instead of engines per the docs, which would result in the default 0.4.7 version being applied.

Sign up to request clarification or add additional context in comments.

1 Comment

interesting, I didn't see that -- especially since it's not an answer. Thanks for penalizing me for trying to help future Googlers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.