Skip to content

[BUG] Source map generation - file not found warning #826

@jbpenrath

Description

@jbpenrath

Before you begin...

  • I have searched the existing issues
  • I am not using version 13.x of node (if so, please upgrade)

Description of the problem

Since the version 11.0.x, I get warnings related to uuid when generating source map at build. To build my project I'm using webpack so the package source-map-loader is used to generate source maps.

Here it is an example of warning I got :

WARNING in ./node_modules/uuid/dist/esm-browser/v6ToV1.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/jbpenrath/dev/github/openfun/richie/src/frontend/node_modules/uuid/src/v6ToV1.ts' file: Error: ENOENT: no such file or directory, open '/Users/jbpenrath/dev/github/openfun/richie/src/frontend/node_modules/uuid/src/v6ToV1.ts'
 @ ./node_modules/uuid/dist/esm-browser/index.js 11:0-48 11:0-48
 @ ./js/widgets/LtiConsumer/index.tsx 24:0-36 51:19-25
 @ ./js/widgets/index.tsx 46:9-38
 @ ./js/index.tsx 48:0-31 183:42-46

It seems source-map-loader is looking for some files located in the src folder but this directory is not embedded in the package so the type file is not found.

I wonder if this is not related to the inlineSourceMap option enabled in your tsconfig.

Recipe for reproducing

No response

Additional information

No response

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions