Decathlon / vitamin-web

Decathlon Design System UI components for web applications
https://decathlon.github.io/vitamin-web
Apache License 2.0
279 stars 77 forks source link

bug(@vtmn/react): Having warnings "fail to parse source map" using React / TSX #1451

Closed liestig closed 1 year ago

liestig commented 1 year ago

Hi, Since using Vitamin, I'm keeping having warnings while running/building my application. It seems to be related to @vtmn/react but I can't find out what's the issue. I tried reinstalling packages, clean caches... but it's still happening. Here are the warnings:

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\actions\VtmnButton\Vtmn
Button.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\c
omponents\actions\VtmnButton\VtmnButton.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'node_modules\@vtmn\react\src\components\actions\VtmnDropdown\Vt
mnDropdown.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\s
rc\components\actions\VtmnDropdown\VtmnDropdown.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\actions\VtmnDropdown\Vt
mnDropdownItem.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\rea
ct\src\components\actions\VtmnDropdown\VtmnDropdownItem.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\actions\VtmnLink\VtmnLi
nk.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\compo
nents\actions\VtmnLink\VtmnLink.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\forms\VtmnSelect\VtmnSe
lect.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\com
ponents\forms\VtmnSelect\VtmnSelect.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\forms\VtmnTextInput\Vtm
nTextInput.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\s
rc\components\forms\VtmnTextInput\VtmnTextInput.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\indicators\VtmnBadge\Vt
mnBadge.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\
components\indicators\VtmnBadge\VtmnBadge.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\indicators\VtmnLoader\V
tmnLoader.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\sr
c\components\indicators\VtmnLoader\VtmnLoader.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\indicators\VtmnPrice\Vt
mnPrice.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\
components\indicators\VtmnPrice\VtmnPrice.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\indicators\VtmnProgress
bar\VtmnProgressbar.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtm
n\react\src\components\indicators\VtmnProgressbar\VtmnProgressbar.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\indicators\VtmnRating\V
tmnRating.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\sr
c\components\indicators\VtmnRating\VtmnRating.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\indicators\VtmnTag\Vtmn
Tag.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\comp
onents\indicators\VtmnTag\VtmnTag.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\navigation\VtmnBreadcru
mb\VtmnBreadcrumb.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\
react\src\components\navigation\VtmnBreadcrumb\VtmnBreadcrumb.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\navigation\VtmnBreadcru
mb\VtmnBreadcrumbItem.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@v
tmn\react\src\components\navigation\VtmnBreadcrumb\VtmnBreadcrumbItem.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\navigation\VtmnNavbar\V
tmnNavbar.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\sr
c\components\navigation\VtmnNavbar\VtmnNavbar.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\navigation\VtmnSearch\V
tmnSearch.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\sr
c\components\navigation\VtmnSearch\VtmnSearch.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\navigation\VtmnTabs\Vtm
nTabs.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\co
mponents\navigation\VtmnTabs\VtmnTabs.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\navigation\VtmnTabs\Vtm
nTabsItem.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\sr
c\components\navigation\VtmnTabs\VtmnTabsItem.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\overlays\VtmnAlert\Vtmn
Alert.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\co
mponents\overlays\VtmnAlert\VtmnAlert.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\overlays\VtmnModal\Vtmn
Modal.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\co
mponents\overlays\VtmnModal\VtmnModal.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\overlays\VtmnPopover\Vt
mnPopover.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\sr
c\components\overlays\VtmnPopover\VtmnPopover.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\overlays\VtmnSnackbar\V
tmnSnackbar.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\
src\components\overlays\VtmnSnackbar\VtmnSnackbar.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\overlays\VtmnToast\Vtmn
Toast.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\co
mponents\overlays\VtmnToast\VtmnToast.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\overlays\VtmnTooltip\Vt
mnTooltip.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\sr
c\components\overlays\VtmnTooltip\VtmnTooltip.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\selection-controls\Vtmn
Checkbox\VtmnCheckbox.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@v
tmn\react\src\components\selection-controls\VtmnCheckbox\VtmnCheckbox.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\selection-controls\Vtmn
Chip\VtmnChip.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\reac
t\src\components\selection-controls\VtmnChip\VtmnChip.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\selection-controls\Vtmn
Quantity\VtmnQuantity.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@v
tmn\react\src\components\selection-controls\VtmnQuantity\VtmnQuantity.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\selection-controls\Vtmn
RadioButton\VtmnRadioButton.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modu
les\@vtmn\react\src\components\selection-controls\VtmnRadioButton\VtmnRadioButton.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\selection-controls\Vtmn
Toggle\VtmnToggle.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\
react\src\components\selection-controls\VtmnToggle\VtmnToggle.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\structure\VtmnAccordion
\VtmnAccordion.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\rea
ct\src\components\structure\VtmnAccordion\VtmnAccordion.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\structure\VtmnCard\Vtmn
Card.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\com
ponents\structure\VtmnCard\VtmnCard.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\structure\VtmnDivider\V
tmnDivider.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\s
rc\components\structure\VtmnDivider\VtmnDivider.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\structure\VtmnList\Vtmn
List.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\com
ponents\structure\VtmnList\VtmnList.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\components\structure\VtmnSkeleton\
VtmnSkeleton.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react
\src\components\structure\VtmnSkeleton\VtmnSkeleton.tsx'

WARNING in ./node_modules/@vtmn/react/dist/index.es.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\my\path\node_modules\@vtmn\react\src\guidelines\iconography\VtmnIcon\Vt
mnIcon.tsx' file: Error: ENOENT: no such file or directory, open 'C:\my\path\node_modules\@vtmn\react\src\g
uidelines\iconography\VtmnIcon\VtmnIcon.tsx'

Have you an idea of where that come from and how to get rid of those ? I have seen a similar problem issued months ago in the git repo, but it hasn't helped me.

Thanks !

lauthieb commented 1 year ago

Hello @liestig, are you using the last version? Because that was a known problem (https://github.com/Decathlon/vitamin-web/pull/1362) and normally it was resolved with this PR by @Shyrro & @thibault-mahe: https://github.com/Decathlon/vitamin-web/pull/1362

liestig commented 1 year ago

Hello @lauthieb, the issue seemed to come from my configuration. I switched to the last version of Vitamin and fixed my project configs and I got rid of those. Sorry, I should have come back earlier to tell that it's resolved ^^.