Once after pulling the latest update from Git, I faced an issue using ngx-material-timepicker along with the luxon library.
(Please note, ngx-material-timepicker is not a new introduction to the project, it has been used for some time)
However, I'm encountering a module resolution error related to luxon when building the project.

When I checked the errors in each .ts file, I noticed that Luxon is referenced from the global TypeScript types directory.
(AppData\Local\Microsoft\TypeScript\5.2\node_modules\@types) and not from (node_modules\@types) within my project. This discrepancy is causing a module resolution error when building the project.

I copied luxon module from a global location and pasted it into my project's local node_modules\@types directory. issues are fixed up to a certain level and only this issue is occurring now.
./node_modules/ngx-material-timepicker/fesm2015/ngx-material-timepicker.js:8:0-39 - Error: Module not found: Error: Can't resolve 'luxon' in 'D:\erpweb\ososerp\Web\node_modules\ngx-material-timepicker\fesm2015'
Things I have tried so far,
node_modules folder and package-lock.json from the project.npm cache clean --force.npm i to reinstall dependencies.How can I resolve this,
I was abled to solve it by doing these steps,
npm install luxon moment
Then installed the required dev dependencies:
npm install --save-dev @types/lodash @types/luxon
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With