Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve some modules: lib/collections #112

Closed
john916zhang opened this issue Jun 21, 2016 · 3 comments
Closed

Unable to resolve some modules: lib/collections #112

john916zhang opened this issue Jun 21, 2016 · 3 comments

Comments

@john916zhang
Copy link

➜  mantra-sample-blog-app git:(master) ✗ meteor
[[[[[ ~/projects/mantra-sample-blog-app ]]]]]

=> Started proxy.
=> Started MongoDB.

Unable to resolve some modules:

  "/Users/mac/projects/mantra-sample-blog-app/lib/collections" in /Users/mac/projects/mantra-sample-blog-app/client/configs/context.js
(web.browser)


Unable to resolve some modules:

  "/Users/mac/projects/mantra-sample-blog-app/lib/collections" in /Users/mac/projects/mantra-sample-blog-app/server/publications/posts.js
(os.osx.x86_64)

W20160621-19:20:16.647(8)? (STDERR)
W20160621-19:20:16.835(8)? (STDERR) /Users/mac/.meteor/packages/meteor-tool/.1.3.3_1.1l8kce++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20160621-19:20:16.835(8)? (STDERR)                             throw(ex);
W20160621-19:20:16.836(8)? (STDERR)                                   ^
W20160621-19:20:16.844(8)? (STDERR) Error: Cannot find module '/Users/mac/projects/mantra-sample-blog-app/lib/collections'
W20160621-19:20:16.845(8)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:85:1)
W20160621-19:20:16.845(8)? (STDERR)     at meteorInstall.server.configs.initial_adds.js (server/configs/initial_adds.js:1:1)
W20160621-19:20:16.845(8)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
W20160621-19:20:16.846(8)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
W20160621-19:20:16.846(8)? (STDERR)     at /Users/mac/projects/mantra-sample-blog-app/.meteor/local/build/programs/server/app/app.js:269:1
W20160621-19:20:16.846(8)? (STDERR)     at /Users/mac/projects/mantra-sample-blog-app/.meteor/local/build/programs/server/boot.js:297:10
W20160621-19:20:16.846(8)? (STDERR)     at Array.forEach (native)
W20160621-19:20:16.846(8)? (STDERR)     at Function._.each._.forEach (/Users/mac/.meteor/packages/meteor-tool/.1.3.3_1.1l8kce++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160621-19:20:16.847(8)? (STDERR)     at /Users/mac/projects/mantra-sample-blog-app/.meteor/local/build/programs/server/boot.js:133:5
=> Exited with code: 8

Unable to resolve some modules:

  "/Users/mac/projects/mantra-sample-blog-app/lib/collections" in /Users/mac/projects/mantra-sample-blog-app/client/configs/context.js
(web.browser)


Unable to resolve some modules:

  "/Users/mac/projects/mantra-sample-blog-app/lib/collections" in /Users/mac/projects/mantra-sample-blog-app/server/publications/posts.js
(os.osx.x86_64)
@MechJosh0
Copy link
Contributor

Don't use the root path of the collections for importing.

For example: mantra-sample-blog-app/server/publications/posts.js
Replace: import {Posts, Comments} from '/lib/collections';
With: import {Posts, Comments} from './../../lib/collections';

@john916zhang
Copy link
Author

it works.

@john916zhang
Copy link
Author

#113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants