Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Meteor: 'Error: Cannot find module..' when deploying to heroku. #144

Closed
olanod opened this Issue · 9 comments

3 participants

@olanod

When using the heroku-buildpack-meteorite to deploy my meteor app to heroku I get this error where blade node-module can not be imported from the package.js file.

@bminer bminer was assigned
@bminer
Owner

OK, yeah... this is super lame. Could you do me a favor and make the following changes to Blade's /meteor/package.js file and post the results here?

On line 1 (or anywhere at the top of package.js, please add the following code:

console.log("__dirname", __dirname);
console.log("__filename", __filename);
console.log("process", process);
console.log("process.cwd()", process.cwd() );
console.log("module", module);
console.log("main module", require.main);

Then, run the build process again, and post the results printed to the console. I'll use the output to derive some sort of patch for Blade. Thanks in advance!!!

@olanod

Here is the debug info. I excluded console.log("__dirname", __dirname);,console.log("__filename", __filename); and console.log("module", module); because I was getting ReferenceError: XXXXX is not defined.

@bminer bminer closed this issue from a commit
@bminer Fixed a bunch of Meteor stuff:
- Cleaned up Meteor `package.js` file to fix `require("blade")` hacks. Should fix #144.
- Now considering `client/views` folder to be in the root namespace. Closes #143.
- Fixed view helpers. They can now be used just like view locals. Also closes #136.
Push to version 3.0.0beta8
a050d0d
@bminer bminer closed this in a050d0d
@bminer
Owner

Please confirm that this bug has been fixed in Blade 3.0.0beta8. Thanks!

@olanod

Now I got a different error but I think it's related. Before the problem was during package installation but now I'm getting this on meteor initialization.

@bminer bminer reopened this
@bminer
Owner

@olanod - Honestly, I have no idea what the problem is here... it's this stupid hack that I have to do to call require("blade"). Meteor overrides require with its own function, which is kinda lame...

Anyway, the Meteor team is actively working on this in the "engine" branch. Once they fix it, the Blade smart package should work just fine. In the meantime, I'll keep this issue open.

For more info see: https://groups.google.com/forum/?fromgroups#!topic/meteor-talk/b6zQrgk8lYo

@epegzz

+1 :+1:

@bminer bminer closed this issue from a commit
@bminer Push to 3.2.0
Fixed newline bug in parser for attributes and parameter lists (closes #155)
Added some new tests
Removed horrible hack for Meteor smart package thanks to Meteor 0.6 improvements (closes #144) (closes #161)
Removed some hacks in NPM postinstall script that were previously needed for Meteor support
1ea24e7
@bminer bminer closed this in 1ea24e7
@bminer
Owner

Please confirm that this is working as of Blade 3.2.2

@olanod

Working with Blade 3.2.2!

@bminer
Owner

Awesome! You can thank the Meteor dev team for this fix. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.