-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Unable to import node module with ".js" in name #349
Comments
Try using a different name in your js and in the aurelia.json mapping. Here's an example for chart.js which has a similar problem: {
"name": "chartjs",
"path": "../node_modules/chart.js/Chart.min",
"exports": "Chart"
} |
@EisenbergEffect Is this a limitation in Aurelia CLI or should one avoid naming packages with a "." regardless? If it's an issue with Aurelia CLI only, is there any plan to fix it? The reason I'm asking is I'm now unable to import a ChartJS plugin because it looks for a package named "chart.js" - not "chartjs" and I can't reasonably ask them to change their name unless this isn't an Aurelia issue. |
@powerbuoy could you provide more info so I can reproduce the issue with the chartjs plugin? |
@JeroenVinke All I did was create a new Aurelia CLI project, Thanks to chartjs/chartjs-plugin-deferred#2 I did notice though that as long as I supply a path I can still name the package with a period which makes it all work. Would still be nice if we didn't have to supply the path manually. |
@powerbuoy I dont really think that is feasible as the path is made exactly for this kind of scenarios. @JeroenVinke we could though try to through a better error message, so the users get better instructions how to switch to using the path property. |
Ok I see, well as long as I can keep the period in the name everything works at least. |
I'm submitting a bug report
0.18.0
Please tell us about your environment:
Operating System:
OSX 10.x|Linux (distro)|Windows [7|8|8.1|10]
Node Version:
6.7.0
NPM Version:
3.10.3
Browser:
all
Language:
ESNext
Current behavior:
When I
npm install --save-dev jump.js
and later add it ("jump.js" literaly - its main property points to its only JS file) to aurelia.jsonbuild.bundles[].dependencies
I get Error: ENOENT: no such file or directory, open '/home/powerbuoy/.../src/main/resources/static/jump.js'If I do the same with say "moment" everything works fine.
Expected/desired behavior:
That I don't get an error.
The text was updated successfully, but these errors were encountered: