vasern / vasern

Vasern is a fast, lightweight and open source data storage for React Native

Home Page:https://vasern.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when linking

theduckchannel opened this issue · comments

Hi,

I was trying link vasern in my app and get the following error:

PS C:\Users\fredc\Documents\Projetos\questoespython3> npx react-native link vasern
warn Calling react-native link [packageName] is deprecated in favor of autolinking. It will be removed in the next major release.
Autolinking documentation: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
info Linking "vasern" iOS dependency
info iOS module "vasern" has been successfully linked
info Linking "vasern" Android dependency
error Linking "vasern" failed. Run CLI with --verbose flag for more details.
Error: ENOENT: no such file or directory, open 'C:\Users\fredc\Documents\Projetos\questoespython3\android\app\src\main\java\com\questoespython3\MainApplication.java'
    at Object.openSync (fs.js:458:3)
    at Object.readFileSync (fs.js:360:35)
    at applyPatch (C:\Users\fredc\Documents\Projetos\questoespython3\node_modules\@react-native-community\cli-platform-android\build\link\patches\applyPatch.js:42:51)
    at Object.registerNativeAndroidModule [as register] (C:\Users\fredc\Documents\Projetos\questoespython3\node_modules\@react-native-community\cli-platform-android\build\link\registerNativeModule.js:34:27)
    at C:\Users\fredc\Documents\Projetos\questoespython3\node_modules\react-native\node_modules\@react-native-community\cli\build\commands\link\linkDependency.js:63:16
    at Array.forEach (<anonymous>)
    at linkDependency (C:\Users\fredc\Documents\Projetos\questoespython3\node_modules\react-native\node_modules\@react-native-community\cli\build\commands\link\linkDependency.js:36:32)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Object.link [as func] (C:\Users\fredc\Documents\Projetos\questoespython3\node_modules\react-native\node_modules\@react-native-community\cli\build\commands\link\link.js:110:5)
    at async Command.handleAction (C:\Users\fredc\Documents\Projetos\questoespython3\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)

Welcome @fredcox! It seems to me that the error wasn't caused by vasern but

Error: ENOENT: no such file or directory, open 'C:\Users\fredc\Documents\Projetos\questoespython3\android\app\src\main\java\com\questoespython3\MainApplication.java'
    at Object.openSync (fs.js:458:3)

Have you try to fix as these thread? Stackoverflow - Can't find my MainApplication.java


Solved it by below mentioned steps:

  1. deleted the project dir
  2. cloned the project
  3. npm i
  4. react-native link

All right