Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-player source map errors #320

Open
nxfi777 opened this issue Mar 8, 2024 · 5 comments
Open

react-player source map errors #320

nxfi777 opened this issue Mar 8, 2024 · 5 comments
Assignees

Comments

@nxfi777
Copy link

nxfi777 commented Mar 8, 2024

I am trying to migrate to dotLottie in my ReactJS application.

Here are the logs when using the @dotlottie/react-player package with npm:

WARNING in ./node_modules/@dotlottie/common/dist/chunk-DCAKKOYV.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '(root dir)\SeaSource\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\copy\src\index.ts' file: Error: ENOENT: no such file or directory, open '(root dir)\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\copy\src\index.ts'

WARNING in ./node_modules/@dotlottie/common/dist/chunk-DCAKKOYV.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '(root dir)\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\create-image\src\index.ts' file: Error: ENOENT: no such file or directory, open '(root dir)\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\create-image\src\index.ts'

WARNING in ./node_modules/@dotlottie/common/dist/chunk-DCAKKOYV.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '(root dir)\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\lanczos\src\convolve.ts' file: Error: ENOENT: no such file or directory, open '(root dir)\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\lanczos\src\convolve.ts'

WARNING in ./node_modules/@dotlottie/common/dist/chunk-DCAKKOYV.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '(root dir)\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\lanczos\src\filters.ts' file: Error: ENOENT: no such file or directory, open '(root dir)\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\lanczos\src\filters.ts'

WARNING in ./node_modules/@dotlottie/common/dist/chunk-DCAKKOYV.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '(root\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\lanczos\src\index.ts' file: Error: ENOENT: no such file or directory, open '(root dir)\node_modules\node_modules\.pnpm\@[email protected]\node_modules\node_modules\.pnpm\@[email protected]\node_modules\@rgba-image\lanczos\src\index.ts'

I can see that for some reason, the .pnpm folder is referenced, but I am using npm.

Here is the component code:

import { DotLottiePlayer } from '@dotlottie/react-player';
import '@dotlottie/react-player/dist/index.css';

const SplashScreen = ({ isSolar }) => {
  return (
    <div className="center-div full">
      <div className="splash-img">
        <DotLottiePlayer
          src="./assets/the.lottie"
          autoplay
          loop
          speed={2.5}
        >
        </DotLottiePlayer>
      </div>
    </div>
  );
};

export default SplashScreen;

I have tried deleting my node_modules folder and reinstalling, but to no avail.

@alokedesai
Copy link

I'm also experiencing this--is this a KI? Is there a suggested workaround?

@theashraf
Copy link
Member

@nxfi777 Which react-player version you're using ?

@nxfi777
Copy link
Author

nxfi777 commented Mar 8, 2024

@theashraf @dotlottie/[email protected]

@afsalz afsalz self-assigned this Mar 18, 2024
@nxfi777
Copy link
Author

nxfi777 commented Apr 5, 2024

@afsalz any updates on this?

@alokedesai
Copy link

alokedesai commented Apr 7, 2024

I believe this is due to player-component not shipping a source map, which in turn causes warnings to be emitted if you use create-react-app (due to its webpack configuration). More information here: facebook/create-react-app#11278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants