add Yjs in package.json
added metro.config.js, config follow react native - However, this package itself specifies a `main` module field that could not be resolved - Stack Overflow
got this error:
Android Bundling failed 1531ms
While trying to resolve moduleyjs
from file/Users/zhangjunyi/Git/SleepGrassRN/app/screens/HomeScreen.tsx
, the package/Users/zhangjunyi/Git/SleepGrassRN/node_modules/yjs/package.json
was successfully found. However, this package itself specifies amain
module field that could not be resolved (/Users/zhangjunyi/Git/SleepGrassRN/node_modules/yjs/dist/yjs.cjs
. Indeed, none of these files exist:
- /Users/zhangjunyi/Git/SleepGrassRN/node_modules/yjs/dist/yjs.cjs(.native|.android.jsx|.native.jsx|.jsx|.android.js|.native.js|.js|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.json|.native.json|.json)
- /Users/zhangjunyi/Git/SleepGrassRN/node_modules/yjs/dist/yjs.cjs/index(.native|.android.jsx|.native.jsx|.jsx|.android.js|.native.js|.js|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.json|.native.json|.json)