plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

[Question] `yarn dev` works but `yarn build` failed

Open ZodiacWind opened this issue 3 years ago • 0 comments

hi, I used sveletkit and plotly.js-dist-min in my project. yarn dev could work, but yarn build not. The error message is that:

E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:19908
  var err = new SyntaxError(message);
            ^

SyntaxError: Unexpected token (37:121525) in E:/Projects/leakage-detector/node_modules/plotly.js-dist-min/plotly.min.js
    at Parser.pp$4.raise (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:19908:13)
    at Parser.pp$9.unexpected (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:17202:8)
    at Parser.pp$5.parseIdent (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:19839:10)
    at Parser.pp$5.parsePropertyName (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:19643:109)
    at Parser.pp$5.parseProperty (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:19570:8)
    at Parser.pp$5.parseObj (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:19524:21)
    at Parser.pp$5.parseExprAtom (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:19259:17)
    at Parser.pp$5.parseExprSubscripts (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:19075:19)
    at Parser.pp$5.parseMaybeUnary (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:19041:17)
    at Parser.pp$5.parseExprOps (E:\Projects\leakage-detector\node_modules\rollup\dist\shared\rollup.js:18968:19) {
  pos: 1407827,
  loc: {
    column: 121525,
    file: 'E:/Projects/leakage-detector/node_modules/plotly.js-dist-min/plotly.min.js',
    line: 37
  },
  raisedAt: 1407828,

……

id: 'E:/Projects/leakage-detector/node_modules/plotly.js-dist-min/plotly.min.js',
hook: 'transform',
code: 'PLUGIN_ERROR',
plugin: 'commonjs',

I'm a newbie here, could anybody help? Thx

ZodiacWind avatar Jun 10 '22 06:06 ZodiacWind