Vite problem building my application
オープン
まだ誰も着手していません。
bug
infrastructure
P2
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
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)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
報告された Vue 3、Vite、plotly.js のセットアップで、本番ビルドを vite build から開始して再現します。plotly.js/lib/index.js と native-promise-only/lib/npo.src.js を、報告された 10 行目の構文エラーの周辺で調査します。本番ビルドがこの resolver エラーなしで完了すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, vite
- 領域
- build-system, data-visualization, frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 28/100