In the distributed package, inside the source maps, there are references to typescript files in the src folder. Since the src folder is not distributed as part of the released package, source map parsing fails.
For example, this is a snippet from index.js.map version 2.0.2:
The file ../src/index.ts does not exist in the package.
I guess the solution would be to remove source maps from the package or add the src at the location the source maps pointing to.
As described in #172, when using create-react-app it results in the following errors:
WARNING in ../node_modules/amazon-kinesis-video-streams-webrtc/lib/Role.js
Module Warning (from ../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '../node_modules/amazon-kinesis-video-streams-webrtc/src/Role.ts' file: Error: ENOENT: no such file or directory, open '..//node_modules/amazon-kinesis-video-streams-webrtc/src/Role.ts'
WARNING in ../node_modules/amazon-kinesis-video-streams-webrtc/lib/SigV4RequestSigner.js
Module Warning (from ../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '..//node_modules/amazon-kinesis-video-streams-webrtc/src/SigV4RequestSigner.ts' file: Error: ENOENT: no such file or directory, open '..//node_modules/amazon-kinesis-video-streams-webrtc/src/SigV4RequestSigner.ts'
WARNING in ../node_modules/amazon-kinesis-video-streams-webrtc/lib/SignalingClient.js
Module Warning (from ../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '../node_modules/amazon-kinesis-video-streams-webrtc/src/SignalingClient.ts' file: Error: ENOENT: no such file or directory, open '../node_modules/amazon-kinesis-video-streams-webrtc/src/SignalingClient.ts'
WARNING in ../node_modules/amazon-kinesis-video-streams-webrtc/lib/index.js
Module Warning (from ../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '../node_modules/amazon-kinesis-video-streams-webrtc/src/index.ts' file: Error: ENOENT: no such file or directory, open '../node_modules/amazon-kinesis-video-streams-webrtc/src/index.ts'
WARNING in ../node_modules/amazon-kinesis-video-streams-webrtc/lib/internal/DateProvider.js
Module Warning (from ../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '../node_modules/amazon-kinesis-video-streams-webrtc/src/internal/DateProvider.ts' file: Error: ENOENT: no such file or directory, open '../node_modules/amazon-kinesis-video-streams-webrtc/src/internal/DateProvider.ts'
WARNING in ../node_modules/amazon-kinesis-video-streams-webrtc/lib/internal/utils.js
Module Warning (from ../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '../node_modules/amazon-kinesis-video-streams-webrtc/src/internal/utils.ts' file: Error: ENOENT: no such file or directory, open '../node_modules/amazon-kinesis-video-streams-webrtc/src/internal/utils.ts'
A workaround for hiding these errors when using cargo is described here.
Hi @SijmenHuizenga, please refer to the React application here and see if it resolves the problems for you. Feel free to reopen the issue if it doesn't
In the distributed package, inside the source maps, there are references to typescript files in the
src
folder. Since thesrc
folder is not distributed as part of the released package, source map parsing fails.For example, this is a snippet from
index.js.map
version2.0.2
:The file
../src/index.ts
does not exist in the package.I guess the solution would be to remove source maps from the package or add the src at the location the source maps pointing to.
As described in #172, when using create-react-app it results in the following errors:
A workaround for hiding these errors when using cargo is described here.