Electron-vue: __stacit is not defined

Created on 14 Mar 2018  ·  4Comments  ·  Source: SimulatedGREG/electron-vue

Hello there !
My project is based on yours.
In [main.js], my code is like this:

/**

when I run dev, everything is OK.
But, when I run build and run the project, err occurred :
【A JavaScript error occurred in the main process】
【Uncaught Exception: ReferenceError: __stacic is not defined】

Any suggestion ?
THX

Most helpful comment

@rodrigopavezi
yeah. check your process.env.NODE_ENV.

All 4 comments

@silentpride did you find how to solve this issue? cheers

If anyone else comes across this issue, this is what solved it for me. Inside webpack.main.config.js and webpack.renderer.config.js I had to comment out the if statements that were checking if the process.env.NODE_ENV was not equal to 'production'.

@rodrigopavezi
yeah. check your process.env.NODE_ENV.

this works for me, thanks!!! Inside webpack.main.config.js and webpack.renderer.config.jscomment out process.env.NODE_ENV !== 'production'condition in lineif (process.env.NODE_ENV !== 'production') { rendererConfig.plugins.push( new webpack.DefinePlugin({ '__static':"${path.join(__dirname, '../static').replace(/\/g, '\\')}" }) ) }

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexiej picture alexiej  ·  3Comments

blackw212 picture blackw212  ·  3Comments

okwangyu picture okwangyu  ·  3Comments

michalzaq12 picture michalzaq12  ·  3Comments

Oriol-GG picture Oriol-GG  ·  3Comments