-
Notifications
You must be signed in to change notification settings - Fork 473
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 '.../node_modules/amazon-chime-sdk-js/src/websocketadapter/defaultwebsocketadapter.ts' #2594
Comments
fix: Added src/ directory under files to resolve issue aws#2594
Hi @manojkalpana24, sorry for late reply. I don't think we want to publish our It seems you imported
|
how to use this path node_modules/amazon-chime-sdk-js/build/websocketadapter/DefaultWebSocketAdapter.js in create react app? |
I've also been getting this error - and I am importing from the correct filepath mentioned: Has there been any research into this? |
Hi @manojkalpana24 and @sd-hoag If it's helpful, I added the See here for some details: https://webpack.js.org/loaders/source-map-loader/#filtersourcemappingurl module: {
strictExportPresence: true,
rules: [
// Handle node_modules packages that contain sourcemaps
shouldUseSourceMap && {
enforce: 'pre',
exclude: /@babel(?:\/|\\{1,2})runtime/,
test: /\.(js|mjs|jsx|ts|tsx|css)$/,
loader: require.resolve('source-map-loader'),
options: {
filterSourceMappingUrl: (url, resourcePath) => {
const shouldSkipLoadingSourceMap =
/.*\/node_modules\/.*/.test(resourcePath) && /.*amazon-chime.*/.test(resourcePath);
return !shouldSkipLoadingSourceMap;
},
},
}, |
@xuesichao the root cause of this is the source maps published with amazon-chime-sdk-js. The final distribution contains source maps referencing sources that do not exist. The source maps should either be removed, or the sources they map to should be included. For example the file |
failed to parse source map from '.../node_modules/amazon-chime-sdk-js/src/websocketadapter/defaultwebsocketadapter.ts'
file: error: enoent: no such file or directory, open '.../node_modules/amazon-chime-sdk-js/src/websocketadapter/defaultwebsocketadapter.ts'
Tried upgrading the amazon-chime-sdk-js to the latest version but no use. As 'src/' directory is not published with amazon-chime-sdk-js so it's blocking us from debugging the actual source also the above error is thrown while building the react application.
The text was updated successfully, but these errors were encountered: