NG6-starter
NG6-starter copied to clipboard
[JSPM] Uncaught ReferenceError: System is not defined
Now that we have successful builds, I'm having an issue actually loading the site from the dist directory. As far as environment, I'm using Node v4.1.1and NPM v3.3.8 along with node-static to host the dist directory.
It looks like there are a chunk of System.register
invocations at the bottom of the bundle. The issue here is that System
is aliased as $__System
everywhere else in the bundle.
I messed with this for a while this morning and didn't get anywhere. There are a number of issues that sound similar to this one such as this -- however it documents the problem as being solved.
Being that this is just a starter project, I propose maybe we just do this.
I had the same issue, update plugin-css to 0.1.17 or higher. https://github.com/systemjs/builder/issues/320
Nice, @JordanBelford! This seems to resolve the plugin-css related issues. Oddly, there's a remaining incompatible inclusion that still breaks the build... It appears to be the necolas/normalize.css dependency (line 11981 in the screenshot above).
I haven't had time to try and debug this much further but it's certainly getting closer!
Had the same issue. After following @JordanBelford advice that issue was resolved. Afterwards I got 'Uncaught ReferenceError: System is not defined'. Including jspm_packages/system.js before build.js in the final index.html is a quick fix.
Updating both plugin-css and normalize solves this issue partially. In the app.js there is a small hotreload configuration for when you're running the app in localhost. If you want to test your minified/uglyfied code locally you can just comment that code section, for production isn't really a issue.