Skip to content
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

au install i18next has wrong path in aurelia.json #533

Closed
anthonyborell opened this issue Mar 10, 2017 · 5 comments
Closed

au install i18next has wrong path in aurelia.json #533

anthonyborell opened this issue Mar 10, 2017 · 5 comments

Comments

@anthonyborell
Copy link

anthonyborell commented Mar 10, 2017

I'm submitting a bug request

Library Version:
0.26.1

Operating System:
Windows 10

Node Version:
6.10.0

NPM Version:
3.10.8

Browser:
all

Language:
all

Current behavior:
Similar to @AshleyGrant issue. Was following the aurelia-i18n tutorial on the docs hub but using v0.26.1 of the CLI.

When using au install i18next the output was:

{
    "name": "i18next",
    "main": "./index.js",
    "path": "../node_modules/i18next",
    "resources": []
 }

however when performing a build I was getting the following error:

File not found or not accessible: D:/source/code/app/i18next/dist/commonjs/index.js. Requested by D:/source/code/app/src/main.js
File not found or not accessible: D:/source/code/app/i18next/dist/commonjs/index.js. Requested by D:/source/code/app/src/main.js

To fix the issue I had to change the path to:

{
    "name": "i18next",
    "path": "../node_modules/i18next/dist/umd",
    "main": "i18next",
    "resources": []
}
@JeroenVinke
Copy link
Collaborator

I think this may be the same issue as #519. i18next uses CommonJS (similar to cheerio) and also uses the .js extension in the require statement (similar to cheerio). The result is that node_modules is missing from the path, which is also what happens in #519. If this issue can be resolved by removing the .js extension here then it is definitely the same issue

@AStoker
Copy link
Contributor

AStoker commented Mar 13, 2017

I have seen many libraries import modules with the .js extension, and it has caused many headaches for me. Can you think of any way to work around this?

@JeroenVinke
Copy link
Collaborator

I'm not exactly sure where this fails yet. Perhaps we can strip off the .js extension somewhere, but we'd have to find the right spot

@JeroenVinke
Copy link
Collaborator

amodrojs/amodro-trace#7

@zewa666
Copy link
Member

zewa666 commented Oct 8, 2018

Fixed with new auto-tracer

@zewa666 zewa666 closed this as completed Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants