Unable to resolve module 'tslib'
See original GitHub issueUnable to resolve module `tslib` from `/Users/TestUser/TestProject/node_modules/react-native-notifications/lib/dist/index.js`: Module `tslib` does not exist in the Haste module map
This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
1. Clear watchman watches: `watchman watch-del-all`.
2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.
4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.
RCTFatal
__28-[RCTCxxBridge handleError:]_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
UIApplicationMain
main
start
0x0
I get this redbox issue when trying to run the project. I know a workaround is to add tslib
as a dependency into my project’s package.json
.
However, I don’t think that is very clean.
What is the optimal way to remove this issue from this great project?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:6
Top Results From Across the Web
Cannot find module "tslib" - angular - Stack Overflow
Show activity on this post. I was using a typescript module I built in a javascript project. This error occurred because I had...
Read more >tslib - npm
This is a runtime library for TypeScript that contains all of the TypeScript helper functions. This library is primarily used by the -- ......
Read more >Cannot find module 'tslib' - Ionic Angular
I am Facing an issue in ionic angular app. E:\project\ionic\uvparentlan>ionic serve ng.cmd run app:serve --host=localhost --port=8100 [ng] ...
Read more >Could not find module in path: '@babylonjs/core/tslib.es6.js'
I really love vitejs so I try to make my first babylon app with it. Here is the basic ES6 scene from the...
Read more >error: cannot find module 'typescript/package.json'
Depending on configuration, you may also need these npm install -D tslib @types/node 12.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is this really the solution? Why isn’t the library installing it as a dependency?
yarn add tslib
solved this for me