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.

Can't build app in production mode

See original GitHub issue

Do NOT ignore this template or your issue will have a very high chance to be closed without comment.

Describe the bug

Can’t successfuly build app in production mode running “npm run build”, while it runs OK in development mode with “npm run dev”

Reproduction

npx create-vite-app test_vue3 cd test_vue3 npm install npm run build

System Info

  • required vite version: 1.0.0-rc.13
  • required Operating System: Windows 7 Ent
  • required Node version: 11.3.0
  • Optional:
    • npm/yarn version : 6.14.8
    • Installed vue version (from yarn.lock or package-lock.json) 3.0.3
    • Installed @vue/compiler-sfc version

Logs (Optional if provided reproduction)

2020-12-01T20:01:35.866Z vite:config env mode: production 2020-12-01T20:01:35.881Z vite:config env: {} [vite] Build errored out. { Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) at error (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:5253:30) at Module.error (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:9821:16) at tryParse (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:9702:23) at Module.setSource (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:10128:19) at ModuleLoader.addModuleSource (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:18289:20) code: ‘PARSE_ERROR’, parserError: { SyntaxError: Unexpected token (1:0) at Object.pp$4.raise (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:15543:13) at Object.pp.unexpected (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:13235:8) at Object.pp$3.parseExprAtom (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:14942:10) at Object.pp$3.parseExprSubscripts (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:14745:19) at Object.pp$3.parseMaybeUnary (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:14722:17) at Object.parseMaybeUnary (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:19145:29) at Object.pp$3.parseExprOps (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:14657:19) at Object.pp$3.parseMaybeConditional (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:14640:19) at Object.pp$3.parseMaybeAssign (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:14608:19) at Object.pp$3.parseExpression (D:\test_vue3\node_modules\rollup\dist\shared\rollup.js:14574:19) pos: 0, loc: Position { line: 1, column: 0 }, raisedAt: 1 }, id: ‘D:\Proj_VUE\test_vue3\index.html’, pos: 0, loc: { file: ‘D:\Proj_VUE\test_vue3\index.html’, line: 1, column: 0 }, frame: ‘1: <!DOCTYPE html>\n ^\n2: <html lang="en">\n3: <head>’, watchFiles: [ ‘D:\Proj_VUE\test_vue3\index.html’ ] } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! test_vue3@0.0.0 build: vite build --debug npm ERR! Exit status 1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
yyx990803commented, Dec 1, 2020

There’s nothing we can do without the actual code.

2reactions
yyx990803commented, Jan 8, 2021

FWIW, Vite have Windows CI, and the CI was passing when the issue was opened, so unless we can see the actual project code that is causing the build to fail, there is literally nothing we can do. Posting all these logs without a reproduction is pointless.

Also, this issue is stale now since 2.0 has a completely new resolver. If this is still an issue with 2.0, please open a new issue with proper reproduction.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't build vue3+vite sample app in production mode on ...
I cannot build a newly created vue3+vite app on Windows in production mode, while it works ok in development mode.
Read more >
Build and run your app - Android Developers
To deploy your app in debug mode, click Debug . Running your app in debug mode lets you set breakpoints in your code,...
Read more >
Development Mode and Production Mode | Looker
Open the Develop menu and disable the Development Mode toggle. Switching in and out of Development Mode with enhanced navigation. If your admin ......
Read more >
Development and production modes - Expo Documentation
Development mode includes useful warnings and gives you access to tools that make development and debugging easier. Production mode minifies your code and ......
Read more >
Prepare and roll out a release - Play Console Help
Starting August 2021, new apps are required to publish with the Android App ... You can create a release on three different testing...
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