-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
jspm beta support #10
Comments
Where exactly is this breaking things? Is it breaking our view loading? |
It breaks half way through the bootstrapping process. This <!doctype html>
<html>
<body aurelia-app>
<script src="jspm_packages/system.js"></script>
<script src="config.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html> It never gets to the point where it tries to load |
Here's the debug log -
|
So, do we just need to change our |
Yes exactly. The reason for this is that the locate hook and normalize hook are now just one hook in the new spec - resolve. So we resolve to URL in normalize now in the latest SystemJS in preparation for this (effectively deprecating the locate hook to be an identity operation). As a result automatic .js extensions which would have been added in locate are now added in normalize. |
I feel like this is going to cause us broader problems. I'm not sure just yet. Is there a way to not upgrade to the Beta? I don't know when I'm going to have time to look into this. Not this week for sure. |
Basically it's caused by module names and URLs being able to exist side-by-side ( |
To update on the exact issue here - System.normalize('templating-resources', parent).then(function(normalized) {
}); Will return As far as I can guess, I think that is the issue for the dynamic import of |
Ok, I think I know the set of scenarios where we do things like that. I will look into it. Is the change of adding the final slash backwards compatible with the current release version? |
Glad it's making sense! Yes, it should be as far as I'm aware. |
@EisenbergEffect Is there any hope that this will be solved in near future? Is there any alternate way to make it work? Can I help in any way? JSPM beta has support for TypeScript transpiler so it's very important for my stack (Aurelia + TS + ASP.NET 5 in VS Code), but today Aurelia doesn't work with JSPM beta... |
@lzonjic It won't be in today's releases, but we can address it soon after. If you want to submit a PR to fix the problem, you are welcome to. In my understanding, it mostly involves changes to how we call the normalize API which happens in the bootstrapper and in the loader-default libraries. |
I'm hoping to release the jspm beta as the main release very soon as it has a lot of important features. This is the blocker for that so please do keep me posted here. |
@guybedford Is there any way to do a synchronous normalize in the new version? Or is the api still the same, just with the change in behavior? |
Also, can you expand on what changes will likely be coming in the new version of the loader spec that might affect us? |
@EisenbergEffect yes there is Did you want to know more about the changes already pushed or further changes in future? |
I'm interested in the future set of changes that are coming. |
@guybedford Do I need to install an updated version of jspm as well? or just the system.js loader? I'm looking into this now after updating to the beta loader and I'm getting a completely different set of errors. The bootstrapper module isn't even loading correctly. |
In my index.html file I have system.src.js:3798 GET http://localhost:9000/dist/aurelia-logging-console.js 404 (Not Found)j @ system.src.js:3798o.fetch @ system.src.js:3798o.fetch @ system.src.js:3798p @ system.src.js:3798(anonymous function) @ system.src.js:3798a @ system.src.js:3798a @ system.src.js:3798n @ system.src.js:3798(anonymous function) @ system.src.js:3798(anonymous function) @ system.src.js:3798(anonymous function) @ system.src.js:3798 I'm stumped. I can't do anything here. Grab the latest skeleton and see. Unless the way jspm installs things has changed as well, and maybe it has, I don't know why this wouldn't work. |
@EisenbergEffect You'll need to install jspm@beta. You can also read here systemjs/systemjs#540 how to reproduce it... |
Got jspm beta installed. Now I am seeing what I expect. Thanks! |
Ok, I've got the fixes into framework (for plugin loading) and templating (for view loading). I will release the patched versions tomorrow. |
@EisenbergEffect Is the change backwards compatible? |
@EisenbergEffect Excellent! I can hardly wait your patch. Thanks! |
Fixed in aurelia/templating@4589ec2 and aurelia/framework@5823c93 |
This might not be completely fixed. I have update to latest aurelia, 0.13.2, and getting a bunch of these 404 errors in the browser console (for templating-resources and templating-router): /jspm_packages/github/aurelia/[email protected]/compose.html 404 (Not Found) |
I have and in my main.js file i am loading aurelia-validation and datatables. |
Disregard my previous comment. I fixed this by modifying the config.js file for aurelia-validation: |
@damianof I'm still having the 404 on the same html pages (same problem as you). Once I added the code on the main.js to use the plugin 'aurelia-validation' it blew up my application. I checked my config.js and the validation piece looks exactly like yours. I've tried deleting the jspm_packages folder and reinstalling it to no avail. If you have any ideas I would really appreciate it, i put the main js code below and the config code as well for your review. Config
Main
|
@lmaspoch The steps outlined by @damianof worked for me but I ran |
@lmaspoch @rdmead223 Here is what i have in my aureliafile.js in addition of the config.js section above:
Also here is my path in config.js:
And here is currently my index.html (it's actually a server-side views served through express/ejs but you get the idea)
Now, not sure how much it matters (and I dont think affects this issue in anyway), but all my aurelia project is inside a folder called 'frontend', which is inside my root for my node/express app. In express, i just serve the whole folder as static.
NOTE: Myself and a couple of partners are building something great with Aurelia and we are targeting our beta to be live in 4 months. The company is called Entensive. Stay tuned on entensive.com and follow on twitter at @entensive as it will be our main channel to communicate when we are ready to launch. |
Ok getting the same error again after trying upgrading to aurelia 1.0.0 beta 1. Here is my config,js file
|
When doing the System.import for a package, the new defaultJSExtensions will provide a
.js
extension at the end of the package name causing Aurelia not to work in jspm beta.To make this easier I've added the ability to run
System.normalize('package/name/')
where the trailing/
then does not automatically add the js extension. This can be tested by running jspm beta withjspm dl-loader --edge
. Then the dynamic imports can be updated to do the above normalization style where necessary.I'm hoping to make the beta the primary release soon, but will wait until this is fixed. If there's any other issues I can help with just let me know.
The text was updated successfully, but these errors were encountered: