wswz0712 2023-04-19 11:34 采纳率: 0%
浏览 32

vite打包报错 "" is not exported

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

报错依赖文件:

img


img

已经安装的依赖:

img

已经尝试过其他版本,还是不能解决报错

  • 写回答

1条回答 默认 最新

报告相同问题?

问题事件

  • 创建了问题 4月19日

悬赏问题

  • ¥15 服务端控制goose报文控制块的发布问题
  • ¥15 学习指导与未来导向啊
  • ¥15 求多普勒频移瞬时表达式
  • ¥15 如果要做一个老年人平板有哪些需求
  • ¥15 k8s生产配置推荐配置及部署方案
  • ¥15 matlab提取运动物体的坐标
  • ¥15 人大金仓下载,有人知道怎么解决吗
  • ¥15 一个小问题,本人刚入门,哪位可以help
  • ¥30 python安卓开发
  • ¥15 使用R语言GD包一直不出结果