I have just installed jsmediatags in my project. Then when I try to build my project, it has the error as below
...
Creating an optimized production build...
Failed to compile.
.\node_modules\jsmediatags\build2\ReactNativeFileReader.js
Cannot find module: 'react-native-fs'. Make sure this package is installed.
You can install this package by running: npm install react-native-fs.
Then I keep installing react-native-fs, and it still has the error.
...
Creating an optimized production build...
Failed to compile.
./node_modules/react-native-fs/FS.common.js
SyntaxError: D:\workspace\zmp3-desktop\node_modules\react-native-fs\FS.common.js: Unexpected token, expected "," (30:29)
28 | };
29 |
> 30 | var normalizeFilePath = (path: string) => (path.startsWith('file://') ? path.slice(7) : path);
| ^
31 |
32 | type MkdirOptions = {
33 | NSURLIsExcludedFromBackupKey?: boolean; // iOS only
...
At that time, I can't find out any article to fix this problem.