Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Vite problem building my application #6613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LeDemz opened this issue May 24, 2023 · 1 comment
Open

Vite problem building my application #6613

LeDemz opened this issue May 24, 2023 · 1 comment
Labels
bug something broken infrastructure build process etc. P2 considered for next cycle

Comments

@LeDemz
Copy link

LeDemz commented May 24, 2023

Hi,

I'm using Vue3 with vite to build my web application. I am currently using plotly.js as a dependency and can use it without issues in dev mode. However, when I try to build my application for production, I encounter the following error :

vite build
vite v4.2.1 building for production...
✓ 420 modules transformed.
✓ built in 3.77s
[commonjs--resolver] Unexpected token (10:90) in /node_modules/native-promise-only/lib/npo.src.js
file: /node_modules/plotly.js/lib/index.js:10:90
 8:   context[name] = context[name] || definition();
 9:   if (typeof module != "undefined" && module.exports) { module.exports = context[name]; }
10:   else if (typeof define == "function" && define.amd) { define(function $AMD$(){ return context[name]; }); }
                                                                                               ^
11: })("Promise",typeof global != "undefined" ? global : this,function DEF(){
12:   /*jshint validthis:true */
error during build:
SyntaxError: Unexpected token (10:90) in /node_modules/native-promise-only/lib/npo.src.js
    at Object.pp$4.raise (file:////node_modules/rollup/dist/es/shared/node-entry.js:20978:13)
    at Object.pp$9.unexpected (file:////node_modules/rollup/dist/es/shared/node-entry.js:18279:8)
    at Object.pp$9.semicolon (file:////node_modules/rollup/dist/es/shared/node-entry.js:18256:66)
    at Object.pp$8.parseExpressionStatement (file:////node_modules/rollup/dist/es/shared/node-entry.js:18739:8)
    at Object.pp$8.parseStatement (file:////node_modules/rollup/dist/es/shared/node-entry.js:18472:24)
    at Object.pp$8.parseBlock (file:////node_modules/rollup/dist/es/shared/node-entry.js:18755:21)
    at Object.pp$8.parseStatement (file:////node_modules/rollup/dist/es/shared/node-entry.js:18437:36)
    at Object.pp$8.parseBlock (file:////node_modules/rollup/dist/es/shared/node-entry.js:18755:21)
    at Object.pp$8.parseStatement (file:////node_modules/rollup/dist/es/shared/node-entry.js:18437:36)
    at Object.pp$8.parseIfStatement (file:////node_modules/rollup/dist/es/shared/node-entry.js:18584:26)
@zhonglin94
Copy link

I met the same problem as you did

@gvwilson gvwilson added bug something broken P2 considered for next cycle infrastructure build process etc. labels Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken infrastructure build process etc. P2 considered for next cycle
Projects
None yet
Development

No branches or pull requests

4 participants