vite打包依赖报错
'getFloat16' is not exported by node_modules/@petamoriken/float16/browser/float16.js, imported by node_modules/ol/node_modules/geotiff/dist-module/geotiffimage.js
file: /iot_web/node_modules/ol/node_modules/geotiff/dist-module/geotiffimage.js:2:9
1: /** @module geotiffimage */
2: import { getFloat16 } from '@petamoriken/float16';
^
3: import getAttribute from 'xml-utils/get-attribute.js';
4: import findTagsByName from 'xml-utils/find-tags-by-name.js';
error during build:
Error: 'getFloat16' is not exported by node_modules/@petamoriken/float16/browser/float16.js, imported by node_modules/ol/node_modules/geotiff/dist-module/geotiffimage.js
at error (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
at Module.error (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:12412:16)
at Module.traceVariable (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:12771:29)
at ModuleScope.findVariable (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:11423:39)
at ChildScope.findVariable (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:6355:38)
at ClassBodyScope.findVariable (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:6355:38)
at ChildScope.findVariable (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:6355:38)
at FunctionScope.findVariable (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:6355:38)
at ChildScope.findVariable (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:6355:38)
at BlockScope.findVariable (file:///D:/workspace/%E7%89%A9%E8%81%94%E7%BD%91%E5%B9%B3%E5%8F%B0%20%E6%96%B0/iot_web/node_modules/rollup/dist/es/shared/rollup.js:6355:38)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the internet-things-platform-web@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\node\node_cache\_logs\2023-04-19T03_07_09_424Z-debug.log
报错依赖文件:
已经安装的依赖:
已经尝试过其他版本,还是不能解决报错