Description I encountered an issue where the Service Worker failed to register with Status code: 15. Additionally, the popup was not functioning correctly.
Root Cause Upon investigation, I found that the source files (
background.js
and
popup.ts
referenced as
popup.js
) contain TypeScript syntax (interfaces, type annotations).
background.js
: Contains interface definitions and type annotations. Browsers cannot execute this directly, leading to a SyntaxError and Service Worker failure.
popup.html
: References
popup.js
, but only
popup.ts
exists in the source, which also contains TypeScript.
Fix I was able to resolve these issues by transpiling the TypeScript code into valid JavaScript (removing types and interfaces).
Environment
OS: Windows
Browser: Chrome
Suggestions It seems the project is intended to be built with TypeScript, but the distributed/source files are mixed. It would be helpful to either:
Distribute compiled
.js
files.
Or include a build script/instruction to generate the JS files from TS.
GoodDay!
日本から、愛をこめて
P.S:すでに対応済みだったらごめんなさい。何かあったら教えてください。怒らんといてください、16なんで愛嬌的な感じで許してください、何でもしますから!(何でもするとは言っていない)
SimpMusic様改善済み_utils-main.zip