avgjs / pixi-live2d

Display live2D model as a sprite in pixi.js.
https://avgjs.github.io/pixi-live2d-example/
Other
676 stars 66 forks source link

Can't import pixi-live2d package #14

Open ThantHtetAung101 opened 1 year ago

ThantHtetAung101 commented 1 year ago

I got this error when I run my localhost [ERROR] Could not resolve "PIXI"

node_modules/pixi-live2d/dist/pixi-live2d.js:52:35:
  52 │     module.exports = factory(require("PIXI"));
     ╵                                      ~~~~~~

You can mark the path "PIXI" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.

4:16:05 PM [vite] error while updating dependencies: Error: Build failed with 1 error: node_modules/pixi-live2d/dist/pixi-live2d.js:52:35: ERROR: Could not resolve "PIXI" at failureErrorWithLog (C:\Just For Fun\Akari\node_modules\esbuild\lib\main.js:1604:15) at C:\Just For Fun\Akari\node_modules\esbuild\lib\main.js:1056:28 at runOnEndCallbacks (C:\Just For Fun\Akari\node_modules\esbuild\lib\main.js:1476:61) at buildResponseToResult (C:\Just For Fun\Akari\node_modules\esbuild\lib\main.js:1054:7) at C:\Just For Fun\Akari\node_modules\esbuild\lib\main.js:1166:14 at responseCallbacks. (C:\Just For Fun\Akari\node_modules\esbuild\lib\main.js:701:9) at handleIncomingPacket (C:\Just For Fun\Akari\node_modules\esbuild\lib\main.js:756:9) at Socket.readFromStdout (C:\Just For Fun\Akari\node_modules\esbuild\lib\main.js:677:7) at Socket.emit (node:events:512:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

SorryToPerson commented 6 months ago

same issue