mtyson
mtyson

Reputation: 8560

JSPM Server Error: Change occurred to a file outside SystemJS loading

I've got a JSPM managed app that works, but it will not auto-reload the changes in JSPM Server.

Here's the simple index.html file:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <head>
    <script src="jspm_packages/system.js"></script>
    <script src="config.js"></script>
    <script>
      System.import('./app');
    </script>
  </head>
</head>
<body>
</body>
</html>

And the ./app.js file:

import $ from 'jquery';

$("body").append("<div>TEST 123</div>");

export let __hotReload = true;

This works. However, if I make a change to the app.js file I get:

�  Client connected. JSPM watching enabled
Change detected: app.js
✅  SystemJS loaded. Initialising ChangeHandler
�  Change to http://127.0.0.1:8080/app.js cannot be handled gracefully:
�  Change occurred to a file outside SystemJS loading

Que paso? How can I get JSPM server to load my changes?

Upvotes: 12

Views: 231

Answers (1)

Yoav Aharoni
Yoav Aharoni

Reputation: 2672

I know it doesn't quite answer your question, but you can try switching to systemjs-hot-reloader https://www.npmjs.com/package/systemjs-hot-reloader.

Upvotes: 2

Related Questions