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

i18n-js dependency missing #101

Closed
VinceBT opened this issue Jun 22, 2017 · 13 comments
Closed

i18n-js dependency missing #101

VinceBT opened this issue Jun 22, 2017 · 13 comments

Comments

@VinceBT
Copy link

VinceBT commented Jun 22, 2017

Since 2.0.0 I've got this error while running the packager, I've clean cached and tried to reinstall all dependencies multiple times

error: bundling: UnableToResolveError: Unable to resolve module `i18n-js` from `C:\XXX\node_modules\react-native-i18n\index.js`: Module does not exist in the module map or in these directories: C:\XXX\node_modules

Temporary fix : npm install -S i18n-js

EDIT: Use npm install fnando/i18n-js#v3.0.1

@zoontek
Copy link
Collaborator

zoontek commented Jun 24, 2017

@VinceBT What package manager are you using?
This problem is tied to i18n-js, which is not available on npm

The npm package is https://www.npmjs.com/package/i18n-js
https://github.com/everydayhero/i18n-js

@VinceBT
Copy link
Author

VinceBT commented Jun 25, 2017

Currently using npm v5
It is available on npm since I managed resolved the problem by using npm install -S i18n-js
I think npm just does not understand the dependency here in your package.json and so it does nothing

"dependencies": {
    "i18n-js": "github:fnando/i18n-js#v3.0.0"
}

@zoontek
Copy link
Collaborator

zoontek commented Jun 25, 2017

@VinceBT It is available on npm, but this an old version, check the README: https://github.com/everydayhero/i18n-js

@VinceBT
Copy link
Author

VinceBT commented Jun 25, 2017

Yes maybe but the issue is still here

@zoontek
Copy link
Collaborator

zoontek commented Jun 25, 2017

@VinceBT Have you tried npm start --reset-cache to start the packager? It fix the issue for me.

npm understand this kind of dependency format actually: https://docs.npmjs.com/files/package.json#github-urls
If you try npm install fnando/i18n-js#v3.0.0 on npm 5, it will add exactly this to the package.json, so it looks like a npm cache issue. Yarn doesn't seem concerned.

@VinceBT
Copy link
Author

VinceBT commented Jun 26, 2017

I've told that I've tried all the cache solutions.
Try to delete node_modules folder and then do npm i and you'll see that the package does not install on npm 5.
PS : The actual command is npm start -- --reset-cache either npm does not pass the argument to the packager.
PS2 : I'm starting to think that this is an issue of NPM that does not initialize Git dependencies of sub-dependencies of a project.

@zoontek
Copy link
Collaborator

zoontek commented Jun 26, 2017

@VinceBT I see. It was fixed not because of the cache, but because I've made an npm install in the root folder.

I check the npm issues like you said, and it is already reported (and the error occurs even with no lockfile):
npm/npm#17405
npm/npm#17365

Possible fixes: npm install fnando/i18n-js#v3.0.1 (instead of the obsolete version on npm), or maybe consider switching to yarn ?

@VinceBT
Copy link
Author

VinceBT commented Jun 26, 2017

I'm switching to yarn temporarily but I had hope that npm finally caught up with Yarn :p
Going to +1 your answer with the fix so anyone can see

@zoontek
Copy link
Collaborator

zoontek commented Jun 26, 2017

@VinceBT Thanks, I keep this issue opened until npm fixes this.
I edited the readme.md.

@felixdivo
Copy link

Is this still relevant?

@VinceBT
Copy link
Author

VinceBT commented Oct 18, 2017

[email protected] seems to be on npm since August

@AlexanderZaytsev @zoontek can you try it and, if it works, update the dependency please ?

@zoontek
Copy link
Collaborator

zoontek commented Oct 18, 2017

@VinceBT Done, thanks

@zoontek zoontek closed this as completed Oct 18, 2017
@vninfo
Copy link

vninfo commented Dec 20, 2017

It's ok when I change to 5.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants