main 标签归档 - 永夜 没有不值得去解决的问题,也没有不值得去学习的技术! Thu, 13 Aug 2026 04:08:30 +0000 zh-Hans hourly 1 https://wordpress.org/?v=7.1.5 https://media.shuijingwanwq.com/2026/05/logo-150x150.png main 标签归档 - 永夜 32 32 在 VS Code 中 Go 报错: main redeclared in this block https://www.shuijingwanwq.com/2026/04/08/9448/ Wed, 08 Apr 2026 09:42:51 +0000 https://www.shuijingwanwq.com/?p=9448 在 VS Code 中编写 Go 代码时遇到 main redeclared in this block 报错,原因是目录下存在多个 main 函数。通过重新整理 A Tour of Go 的练习目录结构,将文件名作为目录名并统一文件名为 main.go,确保每个练习都能独立运行且互不干扰。最终解决了重复声明的问题。

在 VS Code 中 Go 报错: main redeclared in this block最先出现在永夜。

]]>
执行命令:yarn run prod 时,提示:Browserslist caniuse-lite is outdated. Please run npx browserslist@latest –update-db https://www.shuijingwanwq.com/2022/01/13/5705/ Thu, 13 Jan 2022 01:21:33 +0000 https://www.shuijingwanwq.com/?p=5705 执行 yarn run prod 命令时提示 Browserslist 依赖过时,按照指引运行 npx 更新数据库后,继续执行构建命令却报错找不到 autoprefixer 中的 caniuse-lite 模块。排查后删除 node_modules 目录,重新执行 yarn install 安装依赖并运行 yarn run dev,问题解决,不再报错。

执行命令:yarn run prod 时,提示:Browserslist caniuse-lite is outdated. Please run npx browserslist@latest –update-db最先出现在永夜。

]]>