mantrajs / mantra-cli

Command line interface for building Meteor apps with Mantra
MIT License
135 stars 34 forks source link

Unable to resolve some modules #77

Open palpinter opened 8 years ago

palpinter commented 8 years ago

After fresh install I've received th following message:

 "/home/palpinter/development/testapp/lib/collections" in
/home/palpinter/development/testapp/client/configs/context.js (web.browser)

Steps to reproduce:

mantra c testapp cd testapp meteor

from other console: mantra g collection testcoll

After remove 'undefined' from /lib/collections/index.js the result same.

Thx Pal

sungwoncho commented 8 years ago

Looks like a bug in the release candidate for 0.4.0. Use 0.3.13 in the meantime.

palpinter commented 8 years ago

OK, thx.

palpinter commented 8 years ago

Sorry, but result is same with 0.3.13

npm list -g | grep mantra-cli   
├─┬ mantra-cli@0.3.13

Maybe caused by meteor 1.3.3?

palpinter commented 8 years ago

The problem probably on my side. I've tried code generation on my other computer, and everything works as expected. I have to debug it.

macrozone commented 8 years ago

Problem is with meteor 1.3.3. Absolute path no longer seem to work.

Changing the import in client/configs/context.js

from import * as Collections from '/lib/collections';

to import * as Collections from '../../lib/collections';

resolves the issue.

I do not know if this is a regression or intended.

palpinter commented 8 years ago

Unfortunetely you should do it in all file where collections imported.

sungwoncho commented 8 years ago

@palpinter Updating bebel-root-slash-import will resolve the issue. See here. Can you check?