custom-electron-titlebar icon indicating copy to clipboard operation
custom-electron-titlebar copied to clipboard

Multiple warnings in console: "Failed to parse source map from '[.../browser.ts and others]' file: Error: ENOENT"

Open john8329 opened this issue 4 years ago • 3 comments

Describe the bug Since the first time I installed the library, the errors popped on the console.

WARNING in ./node_modules/custom-electron-titlebar/lib/menu/menu.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/.../node_modules/custom-electron-titlebar/src/menu/menu.ts' file: Error: ENOENT: no such file or directory, open '/.../node_modules/custom-electron-titlebar/src/menu/menu.ts'

WARNING in ./node_modules/custom-electron-titlebar/lib/menu/menuitem.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/.../node_modules/custom-electron-titlebar/src/menu/menuitem.ts' file: Error: ENOENT: no such file or directory, open '/.../node_modules/custom-electron-titlebar/src/menu/menuitem.ts'

WARNING in ./node_modules/custom-electron-titlebar/lib/menubar.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/.../node_modules/custom-electron-titlebar/src/menubar.ts' file: Error: ENOENT: no such file or directory, open '/.../node_modules/custom-electron-titlebar/src/menubar.ts'

WARNING in ./node_modules/custom-electron-titlebar/lib/themebar.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/.../node_modules/custom-electron-titlebar/src/themebar.ts' file: Error: ENOENT: no such file or directory, open '/.../node_modules/custom-electron-titlebar/src/themebar.ts'

WARNING in ./node_modules/custom-electron-titlebar/lib/titlebar.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/.../node_modules/custom-electron-titlebar/src/titlebar.ts' file: Error: ENOENT: no such file or directory, open '/.../node_modules/custom-electron-titlebar/src/titlebar.ts'

I narrowed the issue to the source maps, which point to non-existing files in node_modules/custom-electron-titlebar/src/[file].ts. Other packages don't do such things, rather they point to .d.ts definitions.

Fixing it requires the source maps to be changed from this:

{"version":3,"file":"themebar.js","sourceRoot":"","sources":["../src/themebar.ts"],

To this (since sources aren't included):

{"version":3,"file":"themebar.js","sourceRoot":"","sources":["./themebar.d.ts"],

To Reproduce Steps to reproduce the behavior:

  1. Install the library on an Angular 10 app
  2. Open Dev tools
  3. See error

Expected behavior It shouldn't

Screenshots Screenshot 2021-02-14 at 11 50 05

Desktop (please complete the following information):

  • OS: Mac
  • Electron version: 11
  • Framework: Angular

john8329 avatar Feb 14 '21 11:02 john8329

I can confirm this issue. Started to happen since latest update.

EdvinM avatar Mar 01 '21 17:03 EdvinM

I have the same issue

IvanGodinez21 avatar May 22 '21 17:05 IvanGodinez21

me too!

JosueIglesias avatar May 22 '21 17:05 JosueIglesias

📢 This issue has been closed automatically because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Oct 05 '22 18:10 stale[bot]