Skip to content

Warning related to webpack source maps: WARNING in ./node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js #1520

@BjoernKW

Description

@BjoernKW

Describe the bug

When using version 4.4.0 of socket.io-client in a React app created with create-react-app, which in turn uses webpack for creating source maps, I get the following warning when starting the app with npm run start:

WARNING in ./node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/project-directory/node_modules/src/index.ts' file: Error: ENOENT: no such file or directory, open '/project-directory/node_modules/src/index.ts'
@ ./node_modules/engine.io-parser/build/esm/decodePacket.browser.js 2:0-44 38:20-26
@ ./node_modules/engine.io-parser/build/esm/index.js 2:0-45 27:26-38 39:0-68
@ ./node_modules/engine.io-client/build/esm/socket.js 6:0-44 113:16-24 586:18-26
@ ./node_modules/engine.io-client/build/esm/index.js 1:0-37 2:0-18 3:24-39
@ ./node_modules/socket.io-client/build/esm/manager.js 1:0-75 23:4-25 116:22-28
@ ./node_modules/socket.io-client/build/esm/index.js 2:0-39 26:13-20 29:22-29 45:2-9 63:0-79
@ ./src/services/SocketClient.js 3:0-34 9:25-27
@ ./src/components/App/App.js 17:0-59 84:35-48
@ ./src/index.js 9:0-39 12:33-36

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.65.0 compiled with 1 warning in 2358 ms

To Reproduce

Socket.IO client version: 4.4.0

Client

import io from 'socket.io-client';
import {isAPIBaseURLValid} from '../utilities';

const API_BASE_URL = 'http://localhost:8080';

let socketClient;
if (isAPIBaseURLValid(API_BASE_URL)) {
    socketClient = io(API_BASE_URL);
    socketClient.on('connect', () => {
        console.log(socketClient.id);
    });
}

export default socketClient;

Expected behavior
No warning should be displayed

Platform:

  • Device: Mac
  • OS: macOS Monterey 12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions