meteor-react-example icon indicating copy to clipboard operation
meteor-react-example copied to clipboard

[Universe Modules]: Trying to load module "//app-deps/index/main" that doesn't exist!

Open sdbondi opened this issue 9 years ago • 3 comments

I've used your app-deps package in my own app, wondering if you can help.

I've copied from your source and removed the deps I don't need (all but lodash, kept exposify and added yup) and I get an error on the client side when importing a dep.

import { yup } from 'app-deps';
Uncaught (in promise) [Universe Modules]: Trying to load module "//app-deps/index/main" that doesn't exist!
    Error loading /_modules_/packages//app-deps/index/main as "app-deps" from /_modules_/app/client/components/EmailForm

I think the added /index/ is the problem as I see a module in the resulting app-deps.js source /_modules_/packages/app-deps/main

system-config.js

/* global System */

System.config({
  packages: {
    'app-deps': {
      main: 'main',
      format: 'register',
      map: {
        '.': System.normalizeSync('{app-deps}')
      }
    }
  }
});

Any idea what could be causing this? Much appreciated

sdbondi avatar Oct 24 '15 22:10 sdbondi

Guessing the changelog for universe:module from 0.4.1 to 0.6.0 (which I'm using) could be helpful.

https://github.com/vazco/universe-modules/blob/master/CHANGELOG.md

sdbondi avatar Oct 24 '15 22:10 sdbondi

And this commit https://github.com/vazco/universe-modules/commit/942cff7b4d80b210aa9f8999173fc7f65e92cec1

Edit: I see you're tackling this already here: https://github.com/vazco/universe-modules/issues/18 It's still not clear yet to me how to change the package, but I'll write back (and PR) if I fix it.

For now, cos it's really late and I'm about done - a work around which works :

// system-config.js
// Temporary work around for https://github.com/optilude/meteor-react-example/issues/3
System.register("/_modules_/packages/app-deps/index", [], function (_export) {
  /* jshint esnext: true */
  /* global Dependencies */
  "use strict";

  return {
    setters: [],
    execute: function () {
      _export("default", Dependencies);
      _export("_", Dependencies._);
      _export("yup", Dependencies.yup);
    }
  };
});

sdbondi avatar Oct 24 '15 22:10 sdbondi

@sdbondi what steps and which files did you go through to add the yup package? I've been going a bit crazy trying to add the history package and import it into routing.import.jsx. It gets added to .meteor/isopacks dir but it doesn't get pulled into the build folder.

ssbrewster avatar Nov 24 '15 21:11 ssbrewster