react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

Missing source maps v8

Open Donorlin opened this issue 10 months ago • 9 comments

Describe the bug I am using latest webpack, with latest source-map-loader and i am getting errors like this when importing latest version of react-datepicker.

Failed to parse source map from '*****/node_modules/react-datepicker/src/year_dropdown_options.tsx' file: Error: ENOENT: no such file or directory, open '*****/node_modules/react-datepicker/src/year_dropdown_options.tsx'

By the looks of it, you really do not include either sources or inlined source maps ("inlineSources": true, in tsconfig.json) in your built package.

Expected behavior Built package should contain source maps in some way.

Donorlin avatar Feb 14 '25 14:02 Donorlin

I have same issue. Can you take a look? @martijnrusschen

dattm97 avatar Feb 24 '25 03:02 dattm97

I've the same issue here. I prepared a minimal reproduction.

If you look at the terminal, you can notice that source files from src folder are missing. I'm using vite + vitest.

Image showing a list of missing source files

marcomontalbano avatar Feb 24 '25 11:02 marcomontalbano

Feel free to open a PR to fix this

On Mon, Feb 24, 2025 at 12:40 PM Marco Montalbano @.***> wrote:

I've the same issue here. I prepared a reproducible link.

https://stackblitz.com/edit/vitejs-vite-nzien36v?file=package.json&view=editor

If you look at the terminal, you can notice that source files from src folder are missing. I'm using vite + vitest. image.png (view on web) https://github.com/user-attachments/assets/851a5c7a-9a73-4da6-ad7d-ff7dcdb44986

— Reply to this email directly, view it on GitHub https://github.com/Hacker0x01/react-datepicker/issues/5416#issuecomment-2678167145, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY2KFGJ3YKUO4HHXJVLU32RMAMXAVCNFSM6AAAAABXEWXNQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGE3DOMJUGU . You are receiving this because you were mentioned.Message ID: @.***> [image: marcomontalbano]marcomontalbano left a comment (Hacker0x01/react-datepicker#5416) https://github.com/Hacker0x01/react-datepicker/issues/5416#issuecomment-2678167145

I've the same issue here. I prepared a reproducible link.

https://stackblitz.com/edit/vitejs-vite-nzien36v?file=package.json&view=editor

If you look at the terminal, you can notice that source files from src folder are missing. I'm using vite + vitest. image.png (view on web) https://github.com/user-attachments/assets/851a5c7a-9a73-4da6-ad7d-ff7dcdb44986

— Reply to this email directly, view it on GitHub https://github.com/Hacker0x01/react-datepicker/issues/5416#issuecomment-2678167145, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY2KFGJ3YKUO4HHXJVLU32RMAMXAVCNFSM6AAAAABXEWXNQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZYGE3DOMJUGU . You are receiving this because you were mentioned.Message ID: @.***>

martijnrusschen avatar Feb 24 '25 11:02 martijnrusschen

Adding GENERATE_SOURCEMAP=false to the .env file resolves this issue.

Palavesh-KF avatar Feb 24 '25 16:02 Palavesh-KF

I have the same problem and this option only removes the warning but does not resolve the issue

Adding GENERATE_SOURCEMAP=false to the .env file resolves this issue.

kris2kris avatar Mar 07 '25 09:03 kris2kris

anyone know why this is happening when the published files include sourceMappingURL with a base64 string? (that looks like inline maps to me?)

i guess the whole src directory needs to be published for this? 🤔

ImLunaHey avatar Apr 23 '25 14:04 ImLunaHey

@martijnrusschen are you wanting the inline maps fixed or for someone to just include the whole src/* directory? either would be a valid fix.

ImLunaHey avatar Apr 25 '25 09:04 ImLunaHey

the problem is still relevant

VitrukDF avatar Jun 06 '25 07:06 VitrukDF

Same problem here

gcanabatewelbees avatar Jun 12 '25 07:06 gcanabatewelbees

Just pushed a PR (#5710) that fixes this

John-Youngblood avatar Jun 24 '25 19:06 John-Youngblood