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

SystemJs Static Bundle ErrorUncaught Module ./item not present. #2

Open
naveedahmed1 opened this issue Jun 2, 2016 · 4 comments
Open

Comments

@naveedahmed1
Copy link

Hi,

When I use SystemJS builder.buildStatic to bundle my app and run it in browser, the application doesn't work and I see the below error on the console:

bundle.js:1 Uncaught Module ./item not present.

I am following the instructions mentioned on:

https://github.com/jelgblad/angular2-masonry

Everything works fine, if I don't create a bundle.

Can anyone please guide?

@jelgblad
Copy link
Owner

jelgblad commented Jun 15, 2016

Hi! I haven't tried bundling any Angular2 apps, but I will try to look into it. Are you sure the issue is with this package? If you find a solution please let me know :)

@n0mid
Copy link

n0mid commented Oct 7, 2016

I have the same problem. Do you have any solutions ?

@j-muller
Copy link

Same problem here, and can't get any viable solution at the moment.

@sjwall
Copy link

sjwall commented Jan 22, 2017

I have come across the same problem and it looks like it is an issue with how outlayer is packaged into masonry.pkgd.js. I found 2 solutions:

Solution 1

Change SystemJS configuration to look like:

paths: {
     "npm:": "./node_modules/"
},
packages: {
     "angular2-masonry": { "defaultExtension": "js", "main": "index" },
     "outlayer": { "defaultExtension": "js" }
},
map: {
      "angular2-masonry": "npm:angular2-masonry",
      "masonry-layout": "npm:masonry-layout/masonry.js",
      "outlayer": "npm:outlayer",
      "get-size/get-size": "npm:get-size/get-size.js",
      "ev-emitter/ev-emitter": "npm:ev-emitter/ev-emitter.js",
      "fizzy-ui-utils/utils": "npm:fizzy-ui-utils/utils.js",
      "desandro-matches-selector/matches-selector": "npm:desandro-matches-selector/matches-selector.js",
}

Solution 2

Change how ./item is required/defined in the masonry.pkgd.js and masonry.pkgd.min.js files.
Simply replace the 2 instances that "./item" occurs with "outlayer/item"

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

5 participants