node module date-fns won't work
See original GitHub issuethe node module date-fns won’t work with NativeScript. This module as _lib
folder which seems to be ignored by NativeScript causing a:
Failed to find module: "../_lib/toInteger/index.js", relative to: app/tns_modules/date-fns/addDays/
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
How to use date-fns in a Node.js project? - Stack Overflow
I managed to run it successfully by using require as shown below: const fns = require('date-fns') console.log(fns.format(new Date(), ...
Read more >Cannot find module 'date-fns' error | bobbyhadz
To solve the error "Cannot find module 'date-fns'", make sure to install the date-fns package by opening your terminal in your project's root...
Read more >Cannot find module 'date-fns' error [Solved] - Reactgo
The “Cannot find module 'date-fns'” error occurs due to one of the following reasons: The module is not installed in the correct project…...
Read more >module not found: Can't resolve 'date-fns/esm/format' #133
Well, I just tried using import { utcToZonedTime } from 'date-fns-tz'; in a project with "type": "module" with Node.js v17.3.0. I tried the ......
Read more >date-fns - npm
date -fns provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.
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 FreeTop 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
Top GitHub Comments
@NickIliev I can confirm that it happen with 1.29.0. That version does not have a
_lib
directory@NickIliev Actually I think the sample you have is enough. Now I am seeing it randomly when running
tns run android
. It seems like sometimes the_lib
folder is ignored. All other folders are there. Obviously as it is random you can’t really look at this. I get that. Will try to fix it myselfThanks