question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blank App after npm run build

See original GitHub issue

Found an issue or bug? Tell me all about!

Blank App after Build (Dev run perfectly)

npm run pack:renderer

show

ERROR in renderer.js from UglifyJs
Unexpected token: name (ServerDB) [renderer.js:420,6]

I think there is a similar problem http://stackoverflow.com/questions/43598037/error-in-renderer-js-from-uglifyjs-unexpected-token-punc

Describe the issue / bug.

#

How can I reproduce this problem?

#

If visual, provide a screenshot.

#

Tell me about your development environment.
  • Node version: 6.2.2
  • NPM version: 3.9.5
  • vue-cli version: (if necessary)
  • Operating System: MacOS Sierra

If you are looking to suggest an enhancement or feature, then feel free to remove everything above.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
utkukaratascommented, Apr 29, 2017

This might be an off-shoot answer but IME unexpected token errors usually mean I forgot to tell Babel to transpile a module so UglifyJS gets the unprocessed source with all the new JS features and it doesn’t know how to handle; hence the error.

So my bet would be on the babel-loaders configuration. eg…

  {
    test: /\.js$/,
    use: 'babel-loader',
    include: [path.resolve(__dirname, 'app/src'), // make src the root of transpiling, so if your problematic code is under anywhere in src/ Babel will pick it up.
                 //path.resolve(__dirname, 'app/src/renderer') // this is the original line which cages Babel within the renderer/ folder.
              ],
    exclude: /node_modules/
  },
2reactions
utkukaratascommented, Apr 29, 2017

I knew I wasn’t the only one bitten by this 😃

@SimulatedGREG maybe “app/src” should be the default. Because when you add a new module to your project you choose the src/ folder by instinct. It just seems right until NPM shits errors on you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blank page after running build on create-react-app
Run npm run eject. Edit file webpack.config in the config folder.
Read more >
How to fix the Blank screen After a Static Deployment with ...
Now your app knows which is the base URL, run npm run build again and deploy. Wrapping up. The next time you get...
Read more >
Npm start - no error but blank screen - React
Step 4: Run: npm install. But not work. So after I've installed a fresh React app and copied src folder in the newly...
Read more >
[Bug] after running npm run build, on the index.html file ...
Open terminal and npm run build; Open build folder and open index.html file; See blank screen and when inspect on google chrome console...
Read more >
How to fix the Whitescreen After a Static Deployment with ...
Now that we told your app it's base URL, run npm run build again and copy the app to your web space to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found