Could not find package.json up from: /

Viewed 489

I have a little Node Express packaged application with the following webpack.config.js:

module.exports = {
    target: 'node',
    entry: './server.js',
    output: {
        filename: 'node-server.min.js'
    }
}

When i run node node-server.min.js the application works fine but, when i load the file from Electron i am getting the following error message:

Uncaught Error: Could not find package.json up from: / at Function.pkginfo.find (node-server.min.js:6373) at Function.pkginfo.read (node-server.min.js:6390) at module.exports (node-server.min.js:6341) at Object. (node-server.min.js:6403) at Object.styles (node-server.min.js:6408) at webpack_require (node-server.min.js:20) at Object. (node-server.min.js:14624) at Object. (node-server.min.js:14699) at Object. (node-server.min.js:14701) at webpack_require (node-server.min.js:20)

I am loading node-server.min.js file with a script tag.

Any ideas ?

0 Answers
Related