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

Getting 'Failed to parse source map from ...' warnings on CRA 5.0.1 #39

Open
ucanfil opened this issue Mar 21, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@ucanfil
Copy link

ucanfil commented Mar 21, 2023

Thanks for the great library!

This is not a breaking issue for me but I had to post this as an issue since there is no discussions tab in the repo.
Using stdnum-js latest version with CRA v5.0.1 by importing import { stdnum } from 'stdnum'; and getting a bunch of warnings, for ex.:

WARNING in ./node_modules/stdnum/lib/esm/ro/cnp.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '.../node_modules/stdnum/src/ro/cnp.ts' file: Error: ENOENT: no such file or directory, open '/Users/buraktilek/projects/application-frontend/node_modules/stdnum/src/ro/cnp.ts'

Is this due to CRA or due to the library I wonder 🤔, much appreciated if you can provide some answer, cheers!

@koblas
Copy link
Owner

koblas commented Mar 22, 2023

Thanks for the report. It'll be a little bit until I can dig into this in some detail but is very weird.

Can you provide your tsconfig.json file for reference since I'm assuming that that might be part of the source of the "error". Or if you have any other babel settings of note.

@ucanfil
Copy link
Author

ucanfil commented Mar 23, 2023

Hey @koblas, thanks for checking! Here is my tsconfig: (There is no custom babel config)

{
  "compilerOptions": {
    "target": "es6",
    "module": "esnext",
    "outDir": "build",
    "rootDir": "src",
    "strict": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "allowSyntheticDefaultImports": true,
    "useUnknownInCatchVariables": false,
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react",
  },
  "include": [
    "src"
  ],
  "exclude": [
    "node_modules"
  ]
}

This might be relevant -> facebook/create-react-app#11752

**Also if you don't have time and this happens to be a fault on lib side I'd like to contribute if I can, thanks!

@koblas koblas added the bug Something isn't working label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants