tiny-rdm icon indicating copy to clipboard operation
tiny-rdm copied to clipboard

[BUG] 最新的代码或者realise里的最新的代码,直接wails dev,疯狂报错。不知道是vite问题还是啥问题

Open weishengsuptp opened this issue 1 year ago • 2 comments

17:47:26 [vite] Pre-transform error: Failed to resolve import "wailsjs/go/services/browserService.js" from "src/stores/browser.js". Does the file exist?

image

$ npm --version 10.7.0

$ node --version v22.2.0

$ wails version v2.9.1 ♥ If Wails is useful to you or your company, please consider sponsoring the project: https://github.com/sponsors/leaanthony

vite/3.2.10 win32-x64 node-v22.2.0

weishengsuptp avatar Jul 23 '24 09:07 weishengsuptp

发现,把from 'wailsjs/go/services/browserService.js' 改成 from '/wailsjs/go/services/browserService.js' 就可以了,不清楚为啥,绝对路径反而可以。

weishengsuptp avatar Jul 23 '24 13:07 weishengsuptp

这些文件是wails构建的时候生成go到js的接口映射,你试下删掉wailsjs这个目录,再重新用wails命令构建看看。如果还报错估计得报给wails那边处理了

tiny-craft avatar Jul 24 '24 09:07 tiny-craft

太久没回复,这个问题先关闭了,如果还有问题可以继续在这里留言

tiny-craft avatar Sep 25 '24 06:09 tiny-craft