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

module is already loaded error #142

Closed
TobyEalden opened this issue May 10, 2017 · 4 comments
Closed

module is already loaded error #142

TobyEalden opened this issue May 10, 2017 · 4 comments

Comments

@TobyEalden
Copy link

I'm having problems getting this to work - I've followed the instructions and have chokidar-socket-emitter running, but when any file is modified I always get the following in the console:

systemjs-hmr.js:12430
Error: This module is already loaded.
  Evaluating http://localhost:8080/client/main.js
  Loading http://localhost:8080/client/main.js
    at App.loadModule (app.js:72)
    at Object.execute (main.js:30)
    at j (register-loader.js:673)
    at E (register-loader.js:602)
    at O (register-loader.js:535)
    at register-loader.js:132
    at tryCatcher (bluebird.js:5253)

using version 1.1.0
with
jspm "0.17.0-beta.41"

@alexisvincent
Copy link
Owner

Are you able to provide me a small reproducible project. That I can test with? I suspect it has to do with your application, not the loader :)

Otherwise perhaps you can describe your application setup?

@TobyEalden
Copy link
Author

I suspect it has to do with your application, not the loader :)

I'm sure you're right!

I'll try and create a smaller example to reproduce it.

One thing I'm not clear about is whereabouts in the jspm.config.js the @hot tag should be - jspm appears to have added several "map" properties in various places. In desperation my approach has been to add it everywhere (see attached).

jspm.config.js.txt

TobyEalden added a commit to nqminds/nqm-mantra-core that referenced this issue May 14, 2017
@TobyEalden
Copy link
Author

Solved - for future reference, the app is based on the mantra spec and the issue is caused by https://github.com/mantrajs/mantra-core/blob/master/src/app.js#L45.

Fixed by warning instead of throwing if module is already loaded - https://github.com/nqminds/nqm-mantra-core/blob/master/src/app.js#L44

@alexisvincent
Copy link
Owner

:) Awesome! Sorry for the non reply :/

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