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

Failed to parse source map from './' Error: ENOENT: no such file or directory #28

Closed
SaroGFX opened this issue Oct 18, 2022 · 6 comments

Comments

@SaroGFX
Copy link

SaroGFX commented Oct 18, 2022

The ionic serve compiler gives these warning/errors each time. The files are not in those locations. Any thoughts on how to fix this?

[react-scripts] WARNING in ./node_modules/capacitor-native-settings/dist/esm/definitions.js
[react-scripts] Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
[react-scripts] Failed to parse source map from '/Users/saroverhees/Documents/git/appv2/app-v2/node_modules/capacitor-native-settings/src/definitions.ts' file: Error: ENOENT: no such file or directory, open '/Users/saroverhees/Documents/git/appv2/app-v2/node_modules/capacitor-native-settings/src/definitions.ts'
[react-scripts] WARNING in ./node_modules/capacitor-native-settings/dist/esm/index.js
[react-scripts] Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
[react-scripts] Failed to parse source map from '/Users/saroverhees/Documents/git/appv2/app-v2/node_modules/capacitor-native-settings/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/saroverhees/Documents/git/appv2/app-v2/node_modules/capacitor-native-settings/src/index.ts'
[react-scripts] WARNING in ./node_modules/capacitor-native-settings/dist/esm/web.js
[react-scripts] Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
[react-scripts] Failed to parse source map from '/Users/saroverhees/Documents/git/appv2/app-v2/node_modules/capacitor-native-settings/src/web.ts' file: Error: ENOENT: no such file or directory, open '/Users/saroverhees/Documents/git/appv2/app-v2/node_modules/capacitor-native-settings/src/web.ts'

@capacitor/cli: 4.3.0
@capacitor/core: 4.3.0
@capacitor/android: 4.3.0
@capacitor/ios: 4.3.0

@RaphaelWoude
Copy link
Owner

RaphaelWoude commented Nov 10, 2022

Hello. I was not able to reproduce the same warnings u got with a fresh react project. Would you be able to provide me with a minimal reproduction project?

@SaroGFX
Copy link
Author

SaroGFX commented Nov 10, 2022

Hi @RaphaelWoude , I tried to setup a reproduction repo but couldn't manage to reproduce it. I even duplicated the exact node_modules and configuration files in this new repo. And the issue still wasn't there. So I am completely stuck on what might cause this linting error.

It can be however disabled the messages by setting GENERATE_SOURCEMAP=false in .env

If you have any clue to what this could be related to in our codebase, then please let me know. I am eager to learn how this can be an issue in the node_modules but is seemingly unrelated to it.

@RaphaelWoude
Copy link
Owner

RaphaelWoude commented Nov 14, 2022

Would you be able to provide the versions of node & npm that you are currently using? Might have a feeling it has to do with the versions of node or npm.

@SaroGFX
Copy link
Author

SaroGFX commented Nov 14, 2022

@Saros-MBP-2 source-map-error % node -v
v16.14.0
@Saros-MBP-2 source-map-error % npm -v
8.3.1

Thanks for the response. My friend is running 17.4 and 8.4 on a Linux, and is having the same errors :(

@RaphaelWoude
Copy link
Owner

RaphaelWoude commented Nov 14, 2022

I have released a potential fix for the source map warnings in v4.0.3. Now live on NPM.
Please let me know if this fixes the issue.

@SaroGFX
Copy link
Author

SaroGFX commented Nov 15, 2022

@RaphaelWoude This does seem to fix the issue, thanks a lot!

@SaroGFX SaroGFX closed this as completed Nov 15, 2022
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

2 participants