benfred/fmin

vite打包报错

Opened this issue · 0 comments

1.vue2项目
2.webpack打包的时候没有问题,换成vite打包出现
node_modules/venn.js/src/layout.js:1:76: error: Could not resolve "../node_modules/fmin/index.js"
1 │ import { nelderMead, bisect, conjugateGradient, zeros, zerosM, norm2 } from '../node_modules/fmin/index.js'
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/venn.js/src/diagram.js:6:27: error: Could not resolve "../node_modules/fmin/index.js"
6 │ import { nelderMead } from '../node_modules/fmin/index.js'
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error when starting dev server:
Error: Build failed with 2 errors:
node_modules/venn.js/src/diagram.js:6:27: error: Could not resolve "../node_modules/fmin/index.js"
node_modules/venn.js/src/layout.js:1:76: error: Could not resolve "../node_modules/fmin/index.js"
at failureErrorWithLog (E:\cms_working\jifen-cms\jifen-cms\node_modules\esbuild\lib\main.js:1493:15)
at E:\cms_working\jifen-cms\jifen-cms\node_modules\esbuild\lib\main.js:1151:28
at runOnEndCallbacks (E:\cms_working\jifen-cms\jifen-cms\node_modules\esbuild\lib\main.js:941:63)
at buildResponseToResult (E:\cms_working\jifen-cms\jifen-cms\node_modules\esbuild\lib\main.js:1149:7)
at E:\cms_working\jifen-cms\jifen-cms\node_modules\esbuild\lib\main.js:1258:14
at E:\cms_working\jifen-cms\jifen-cms\node_modules\esbuild\lib\main.js:629:9
at handleIncomingPacket (E:\cms_working\jifen-cms\jifen-cms\node_modules\esbuild\lib\main.js:726:9)
at Socket.readFromStdout (E:\cms_working\jifen-cms\jifen-cms\node_modules\esbuild\lib\main.js:596:7)
at Socket.Readable.push (node:internal/streams/readable:226:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)