jedwards1211 / meteor-imports-webpack-plugin

Webpack plugin to import and use Meteor packages like if they were real NPM packages.
MIT License
25 stars 10 forks source link

You can't create a Meteor project inside another Meteor project? #27

Closed DylanLyon closed 6 years ago

DylanLyon commented 6 years ago

I must be misunderstanding how to use this plugin because the very first step in the documentation doesn't work?

You're supposed to cd into your project root directory then create a new meteor server inside of it. Except when you try to do that you get this error, 'You can't create a Meteor project inside another Meteor project.'

Am I missing something?

This plugin extracts the meteor packages from a real meteor project, which lives in a subfolder. Is that even possible? I could really use some help getting this thing working. Thanks!

jedwards1211 commented 6 years ago

ah, your top-level folder is not supposed to be a meteor project, only the subfolder inside of it should be a meteor project. To be specific, the top-level folder should not contain a .meteor directory. Try creating an new empty folder, copying your current meteor project into it as a subfolder, and then trying to follow the documentation. If you have any problems after that please open another issue.

jedwards1211 commented 6 years ago

Also, I just added the explanation about the top-level directory to the readme.

DylanLyon commented 6 years ago

@jedwards1211 so it would look like this?

New Folder ---Main Project Folder ----- .meteor Folder ----- all project files/folders ---Meteor server ----- .meteor folder

That makes sense and was a configuration I tried but couldn't get working. But now that I know it's the correct setup I'll take another crack at it! Thanks!

DylanLyon commented 6 years ago

@jedwards1211 might as well ask this here instead of opening a new issue.

I'm trying to get React Storybook/Styleguidist working with my project, and the issue I'm running into is that they use webpack and whenever it encounters a file with a meteor import (i.e. 'import Roles from meteor/alanning:roles') it can't find the module because it's not an npm module.

Do you think your plugin can help with this? If not, can you possibly point me in the proper direction?

staeke commented 6 years ago

@DylanLyon - the plugin should work. Do you experience any problems, and if so - what problems?