You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I am not able to get it to work when keeping this code in a separate local package.
Here is what I am doing:
I have set the dependency of my package on meteorhacks:npm (and tried npm-container too) and keeping the packages.json file in the root path of my package.
The error I am getting:
ReferenceError: require is not defined
Could you please tell me how to resolve this?
The text was updated successfully, but these errors were encountered:
anothermohit
changed the title
Compatibility issue with Packages based Architecture
Compatibility issue with Packages based Architecture (with PhantomJS)
Mar 8, 2016
I have found a workaround myself but sadly it's not wrapping up the complete code in a package. Here is what worked for me, in case anybody else comes here looking
So, I added the package.json and private/phantomDriver.js in my ROOT meteor directory and put my Meteor method inside my local package. So, following this answer , you don't have to change any code, just reposition the files this way.
One weird thing happens when you don't put any js file in your ROOT directory, your assets (package.json and phantomDriver.js) sitting in the root becomes inaccessible. So, you have to create a blank .js file in the ROOT directory to resolve this meteor issue, if you don't have any other (like in the strict package architecture, but sadly it won't remain anymore now).
Hi,
I am trying to use Phantomjs. It works perfectly fine if I install it directly in my Meteor directory following these steps - http://stackoverflow.com/a/28125219/4382567
But I am not able to get it to work when keeping this code in a separate local package.
Here is what I am doing:
I have set the dependency of my package on meteorhacks:npm (and tried npm-container too) and keeping the packages.json file in the root path of my package.
The error I am getting:
ReferenceError: require is not defined
Could you please tell me how to resolve this?
The text was updated successfully, but these errors were encountered: