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

bug: source maps not working as expected, warnings on react-scripts 5 #247

Open
4 of 6 tasks
liamdebeasi opened this issue Feb 25, 2022 · 4 comments · May be fixed by #310
Open
4 of 6 tasks

bug: source maps not working as expected, warnings on react-scripts 5 #247

liamdebeasi opened this issue Feb 25, 2022 · 4 comments · May be fixed by #310

Comments

@liamdebeasi
Copy link

Ionic Team note: This is a continuation of ionic-team/ionic-framework#24848.

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

Libraries (Ionic storage, Capacitor Radar, Capacitor Community Camera Preview) don't load correctly. For Ionic Storage, ionic serve gives an error:

[react-scripts] Failed to parse source map from 'C:\Users\USER\Desktop\FOLDER\ionic-6-testing\node_modules\@ionic\storage\src\index.ts' file: Error: ENOENT: no such file or directory, open 'C:\Users\USER\Desktop\FOLDER\ionic-6-testing\node_modules\@ionic\storage\src\index.ts'

Expected Behavior

In Ionic 5 the same process doesn't produce an error and the libraries work.

Steps to Reproduce

ionic start bug-testing blank --type=ionic-react
cd bug-testing
npm install @ionic/storage

Add the following line to Home.tsx:

import { Storage } from "@ionic/storage";
const store = new Storage();

Code Reproduction URL

https://github.com/villepaananen/ionic-6-enoent-error

Ionic Info

[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package'

       Require stack:
       - C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
       - C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
       - C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
       - C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic
[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package'

       Require stack:
       - C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
       - C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
       - C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
       - C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

Ionic:

   Ionic CLI       : 6.18.1 (C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework : @ionic/react 6.0.9

Capacitor:

   Capacitor CLI      : 3.4.1
   @capacitor/android : not installed
   @capacitor/core    : 3.4.1
   @capacitor/ios     : not installed

Utility:

   cordova-res : 0.15.4
   native-run  : 1.5.0

System:

   NodeJS : v16.14.0 (C:\Program Files\nodejs\node.exe)
   npm    : 8.5.2
   OS     : Windows 10

Additional Information

No response

@liamdebeasi liamdebeasi changed the title bug: package does not ship with source maps, warnings on react-scripts 5 bug: source maps not working as expected, warnings on react-scripts 5 Feb 25, 2022
@zac404
Copy link

zac404 commented Nov 24, 2022

Same problem here:
[react-scripts] Failed to parse source map from '/Users/USER/FOLDER/node_modules/@ionic/storage/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/USER/FOLDER/node_modules/@ionic/storage/src/index.ts'

I am using:
@ionic/react: 6.3.8, @ionic/storage: 3.0.6, MacOS 12.6

@b3nk4n
Copy link

b3nk4n commented Dec 13, 2022

Same problem here:
[react-scripts] Failed to parse source map from '/Users/USER/FOLDER/node_modules/@ionic/storage/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/USER/FOLDER/node_modules/@ionic/storage/src/index.ts'

I am using:
@ionic/react: ^6.0.0, @ionic/storage: 3.0.6, MacOS 13.0.1

@olliescase
Copy link

Same issue for me too -

[react-scripts] Failed to parse source map from '/Users/USER/FOLDER/node_modules/@ionic/storage/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/USER/FOLDER/node_modules/@ionic/storage/src/index.ts'
Software Version
Node v18.10.0
@ionic/core 6.4.2
@ionic/react 6.4.2
@ionic/storage 3.0.6
OS MacOS Ventura 13.1

Is there any updates to this issue? We're approaching the 1-year anniversary 😄

@mattbatman
Copy link

Same basic issue.

[react-scripts] Failed to parse source map from '/Users/user/project/node_modules/@ionic/storage/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/user/project/node_modules/@ionic/storage/src/index.ts'
Software Version
Node v18.15.0
@ionic/react ^6.0.0
@ionic/storage ^3.0.6
OS MacOS Ventura 13.2.1
@capacitor/android 4.7.1

Reggino pushed a commit to Reggino/ionic-storage that referenced this issue Aug 8, 2023
Reggino pushed a commit to Reggino/ionic-storage that referenced this issue Aug 8, 2023
@Reggino Reggino linked a pull request Aug 9, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

5 participants