Skip to content

Failed to Parse Source Map #1070

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

Closed
jrock2004 opened this issue Jan 22, 2022 · 3 comments · Fixed by #1095
Closed

Failed to Parse Source Map #1070

jrock2004 opened this issue Jan 22, 2022 · 3 comments · Fixed by #1095
Labels
bug Something isn't working

Comments

@jrock2004
Copy link

Describe the bug

When generate a project using a template I have created that has msw I get a bunch of Failed to parse source map from

Environment

  • msw: 0.36.5
  • nodejs: 16.13.2
  • npm: 8.1.2

Please also provide your browser version.

To Reproduce

Steps to reproduce the behavior:

  1. npx create-react-app@latest blog2 --template @jrock2004/cra-template-a11y
  2. cd into directory
  3. npm run start
  4. See error

Expected behavior

App runs and nothing in console about warning about source maps

Screenshots

If applicable, add screenshots to help explain your problem.

Example of the output I see

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/createInterceptor.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/createInterceptor.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/index.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/XMLHttpRequestOverride.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/XMLHttpRequestOverride.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/index.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/polyfills/EventPolyfill.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/polyfills/EventPolyfill.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/polyfills/ProgressEventPolyfill.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/polyfills/ProgressEventPolyfill.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/utils/bufferFrom.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/utils/bufferFrom.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/utils/createEvent.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/XMLHttpRequest/utils/createEvent.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/fetch/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/interceptors/fetch/index.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/remote.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/remote.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/utils/getCleanUrl.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/utils/getCleanUrl.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/utils/parseJson.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/utils/parseJson.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/utils/toIsoResponse.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/utils/toIsoResponse.ts'

Failed to parse source map from '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/utils/uuid.ts' file: Error: ENOENT: no such file or directory, open '/Users/jcostanzo/Development/blog2/node_modules/@mswjs/interceptors/src/utils/uuid.ts'
@jrock2004 jrock2004 added the bug Something isn't working label Jan 22, 2022
@washingtonsoares
Copy link

Hi @jrock2004!

I was facing the same issue, and a comment from #1030 solved my problem: #1030 (comment)

akunzai added a commit to akunzai/react-boilerplate that referenced this issue Jan 25, 2022
- Fixes warnings: [Failed to parse source map from](mswjs/msw#1070)
- mswjs/msw#1030
@kettanaito
Copy link
Member

Hey, @jrock2004. This looks like a duplicate of #1030. There's a suggestion on how to circumvent these warnings from @washingtonsoares above.

We have the issue to publish the source code of @mswjs/interceptors to NPM so webpack can build its source maps (see mswjs/interceptors#196). You are welcome to help us with that, if it sounds interesting to you.

@github-actions
Copy link

🎉 This issue has been resolved in version 0.38.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants