Closed mookid8000 closed 8 years ago
now I came across this issue where it is shown that resources can be added within the dependencies element - I tried doing that (adapting the paths to point relatively correct) like this:
{
"name": "aurelia-chart",
"path": "../node_modules/aurelia-chart/dist/amd",
"main": "index",
"resources": [
"elements/chart-element.js",
"attributes/chart-attribute.js"
]
}
which I could build just fine.... but then I got another error when running the app:
vendor-bundle.js:3661 Uncaught Error: Mismatched anonymous define() module
(...source code here...)
Am I on the path to something? Is this a sign that aurelia-chart is just not supported with aurelia-cli?
Hey, I don't have a clue, Aurelia recently did a major update with breaking changes and also now some people use jspm (which was supported for last version) others use NPM some people use webpack and others, problem is that I cannot find out specifically what needs to change to support the new aurelia and webpack things, for my other plugins someone has just made the config change (as the core library logic has not changed in ages and should still be stable).
I will see if I can find out what specifically needs to change as there are few errors outstanding all to do with the latest version of aurelia and webpack.
Hi, I have the same problem... exactly this result =\ Do you found any solution?
I found this related post: http://stackoverflow.com/questions/15371918/mismatched-anonymous-define-module
and
Not a clue, from my perspective the latest version of aurelia is basically wanting plugin authors to support npm, webpack, jspm as well as their custom toolchains around each like the AMD Aurelia CLI and the custom webpack faff and I have asked for someone in the team to take a look a few times and it got no traction so if someone can make a reproduction in cloud9 or somewhere I can attempt to take a look and see if I can come up with some fix.
Yep, I fixed it, using aurelia-skeleton with jspm...then it worked...but I had to restructure my project =\
Glad it works for you, its a pain for you though having to completely change your project just to get your dependencies via some other lib.
I posted some info which I believe is related to this:
aurelia/cli#270
I am not sure if it helps but someone told me that the CLI currently cannot handle double quotes, so it needs single quotes around the entries in there or it bombs out, not sure if that is related.
As @pkozul alluded to, this has been fixed via aurelia/cli#283 and is available in aurelia-cli 0.20.0.
For reference, my working auerlia.json bits:
{
"name": "chart.js",
"path": "../node_modules/chart.js/dist",
"main": "chart"
},
{
"name": "aurelia-chart",
"path": "../node_modules/aurelia-chart/dist/amd",
"main": "index",
"resources": [
"elements/chart-element.js",
"elements/chart-element.html",
"attributes/chart-attribute.js"
]
}
Marking this as closed then, if problems still arise feel free to re-raise.
Hello there, this is JavaScript n00b with a problem.... I am sorry if this is a completely obvious mistake on my part, but it could also be an error.... and I need to stop hitting myself on the head with this!
I would love to use aurelia-chart in my new Aurelia app, so I happily
with mostly default settings all the way to create a the app. I am using version 0.17.0 of aurelia-cli btw. Then I
and go edit
aurelia.json
to add the build resources like described in the readme, like so:but then I figured that aurelia-chart would also need to have something added in the
dependencies
field – otherwiseaurelia.use.plugin('aurelia-chart')
would of course not work – so I addedbecause that could make
au build
succeed. Having addedaurelia.use.plugin('aurelia-chart')
to myconfigure
function, I tried to run the application, but it complained thatchart.js
was missing. So I figured I would install that, which I did by goingafter which I added
to
aurelia.json
so I could build.Now when I run the application I get these messages in the console – first this:
and then this:
I apologize in advance for the long tale of my woes - if anyone can tell me what is wrong with me, I would be (on the road to becoming) very happy... 😩 ➡️ 😐 ➡️ 😁
In case someone gets a kick out of these things, I have included a screenshot of the entire thing: