question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to resolve module 'tslib'

See original GitHub issue
Unable 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:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:6

github_iconTop GitHub Comments

2reactions
Rc85commented, Jul 29, 2021

Is this really the solution? Why isn’t the library installing it as a dependency?

2reactions
kunalgorithmcommented, Jan 21, 2021

yarn add tslib solved this for me

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found