0

I have "Load Unpack"ed my client-side + server-side(node.js) extension, and I get this error on the service worker.

In this thread the solution regards to chrome certificate, so i checked my certificate in chrome and it is outdated, but I'm not sure if it's relevant to my case. In the chrome documentation, no certificates are mentioned as a requirement.

Here's my service worker ("type": "module"):

import PythonShell from './node_modules/python-shell'; 
import express from './node_modules/@types/express';

const app = express();
 
app.use(express.static('public'));
app.use(express.json({limit: '1mb'}))

app.post('/api', (request, response)=>{
...
)}
PythonShell.run(...
{
});

});


yuvala
  • 31
  • 4
  • 1) Use webpack or another bundler. 2) If the error persists, make an empty service worker, open it in devtools, then paste the full compiled js into devtools console and run it to see the error. – wOxxOm Dec 10 '22 at 21:38
  • The problem is the specific module 'express'. I tried webpack/browserify and theyr'e both failing to handle it (but work fine without it). What can I do? – yuvala Dec 12 '22 at 17:56
  • Extensions run in the browser, so a server-side `express` package that requires node.js won't run in an extension. I've already explained how you can find the actual error. – wOxxOm Dec 12 '22 at 18:16

0 Answers0