- 旧版本备份external文件夹,然后双清,装新版本。
- 然后把external放到新装的koishi根目录下。
- 在根目录跑一次yarn或者npm i
迁移后编译发生问题:
迁移后编译发生问题:
直接运行 yarn
或者 npm i
就可以了啊
我丢人了!
原来还可以这样,我是在n_m里面创建一个文件夹,把external里的一个插件复制进去,好像也没啥问题(
下次 yarn 的时候文件夹会消失,提前做好备份就行
佬救救!
我最近通过使用yarn迁移后,能够在node_modules
出现软链接,但是在新的模板项目根目录下执行yarn build
了后,external
文件夹下所有工作区内都不会出现lib
我是这么做的:
yarn create koishi
新建新版本koishi的模板项目external
文件夹剪切黏贴到新的koishi模板项目的根目录下node_modules
文件夹内容:external
文件夹内容:yarn build
,似乎build
完成后没有消息更新node版本到20
没能复现)
PS C:\Users\5800h\Desktop\work\temp> yarn create koishi
yarn create v1.22.21
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-koishi@6.2.0" with binaries:
- create-koishi
[##########################] 26/26
Create Koishi v6.2.0
√ Project name: ... koishi-temp
Scaffolding project in koishi-temp ...
Done.
√ Initialize Git for version control? ... yes
Done.
√ Install and start it now? ... yes
➤ YN0088: A new stable version of Yarn is available: 4.0.2!
➤ YN0088: Upgrade now by running yarn set version 4.0.2
➤ YN0000: · Yarn 4.0.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @koishijs/client@npm:5.26.6, @koishijs/plugin-actions@npm:0.0.2, and 621 more.
➤ YN0000: └ Completed in 2s 146ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 13 packages were added to the project (+ 8.16 MiB).
➤ YN0000: └ Completed in 0s 548ms
➤ YN0000: ┌ Link step
➤ YN0007: │ esbuild@npm:0.18.20 must be built because it never has been before or the last one failed
➤ YN0007: │ vue-demi@npm:0.14.6 [571a2] must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 4s 576ms
➤ YN0000: · Done in 7s 363ms
2024-01-29 09:01:45 [I] app Koishi/4.16.7
2024-01-29 09:01:45 [I] loader apply plugin group:entry
2024-01-29 09:01:45 [I] loader apply plugin group:server
2024-01-29 09:01:45 [I] loader apply plugin server:m2yvfl
2024-01-29 09:01:45 [I] loader apply plugin group:basic
2024-01-29 09:01:45 [I] loader apply plugin commands:enoe6i
2024-01-29 09:01:45 [I] loader apply plugin help:hcc27l
2024-01-29 09:01:45 [I] loader apply plugin locales:qxx3kp
2024-01-29 09:01:45 [I] loader apply plugin rate-limit:1iz48k
2024-01-29 09:01:45 [I] loader apply plugin telemetry:rfq6oj
2024-01-29 09:01:45 [I] loader apply plugin group:console
2024-01-29 09:01:45 [I] loader apply plugin actions:q72i02
2024-01-29 09:01:45 [I] loader apply plugin analytics:b8raot
2024-01-29 09:01:45 [I] loader apply plugin config:j9zryd
2024-01-29 09:01:45 [I] loader apply plugin console:1vstgj
2024-01-29 09:01:45 [I] loader apply plugin dataview:mz8k86
2024-01-29 09:01:45 [I] loader apply plugin explorer:k3fkmj
2024-01-29 09:01:45 [I] loader apply plugin logger:m5opl2
2024-01-29 09:01:45 [I] loader apply plugin insight:ch3mit
2024-01-29 09:01:45 [I] loader apply plugin market:k799b6
2024-01-29 09:01:45 [I] loader apply plugin notifier:sbrl8t
2024-01-29 09:01:45 [I] loader apply plugin oobe:0iqifw
2024-01-29 09:01:45 [I] loader apply plugin sandbox:578zoz
2024-01-29 09:01:45 [I] loader apply plugin status:tudtuj
2024-01-29 09:01:45 [I] loader apply plugin theme-vanilla:hryoyq
2024-01-29 09:01:45 [I] loader apply plugin group:storage
2024-01-29 09:01:45 [I] loader apply plugin database-sqlite:0vhy6d
2024-01-29 09:01:45 [I] loader apply plugin assets-local:4dq64d
2024-01-29 09:01:45 [I] loader apply plugin group:adapter
2024-01-29 09:01:45 [I] assets missing config "selfUrl", fallback to "file:" scheme
2024-01-29 09:01:45 [I] server server listening at http://127.0.0.1:5141
2024-01-29 09:01:45 [I] console webui is available at http://127.0.0.1:5141
2024-01-29 09:01:45 [I] sqlite auto creating table user
2024-01-29 09:01:45 [I] sqlite auto creating table binding
2024-01-29 09:01:45 [I] sqlite auto creating table channel
2024-01-29 09:01:45 [I] sqlite auto creating table analytics.message
2024-01-29 09:01:45 [I] sqlite auto creating table analytics.command
2024-01-29 09:01:50 [I] app terminated by SIGINT
^C
PS C:\Users\5800h\Desktop\work\temp> cd .\koishi-temp\
PS C:\Users\5800h\Desktop\work\temp\koishi-temp> yarn setup test
√ description: ...
➤ YN0000: · Yarn 4.0.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 391ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: · Done in 0s 772ms
PS C:\Users\5800h\Desktop\work\temp\koishi-temp> cd .\external\
PS C:\Users\5800h\Desktop\work\temp\koishi-temp\external> ls
目录: C:\Users\5800h\Desktop\work\temp\koishi-temp\external
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2024/1/29 9:02 test
PS C:\Users\5800h\Desktop\work\temp\koishi-temp\external> cd .\test\
PS C:\Users\5800h\Desktop\work\temp\koishi-temp\external\test> ls
目录: C:\Users\5800h\Desktop\work\temp\koishi-temp\external\test
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2024/1/29 9:02 src
-a---- 2024/1/29 9:01 147 .editorconfig
-a---- 2024/1/29 9:01 76 .gitattributes
-a---- 2024/1/29 9:01 165 .gitignore
-a---- 2024/1/29 9:01 31 .npmignore
-a---- 2024/1/29 9:02 311 package.json
-a---- 2024/1/29 9:02 150 readme.md
-a---- 2024/1/29 9:02 444 tsconfig.json
PS C:\Users\5800h\Desktop\work\temp\koishi-temp\external\test> cd ../../
PS C:\Users\5800h\Desktop\work\temp\koishi-temp> yarn build
TSFILE: C:/Users/5800h/Desktop/work/temp/koishi-temp/external/test/lib/index.js
TSFILE: C:/Users/5800h/Desktop/work/temp/koishi-temp/external/test/lib/index.d.ts
TSFILE: C:/Users/5800h/Desktop/work/temp/koishi-temp/external/test/tsconfig.tsbuildinfo
PS C:\Users\5800h\Desktop\work\temp\koishi-temp> cd .\external\test\
PS C:\Users\5800h\Desktop\work\temp\koishi-temp\external\test> ls
目录: C:\Users\5800h\Desktop\work\temp\koishi-temp\external\test
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2024/1/29 9:02 lib
d----- 2024/1/29 9:02 src
-a---- 2024/1/29 9:01 147 .editorconfig
-a---- 2024/1/29 9:01 76 .gitattributes
-a---- 2024/1/29 9:01 165 .gitignore
-a---- 2024/1/29 9:01 31 .npmignore
-a---- 2024/1/29 9:02 311 package.json
-a---- 2024/1/29 9:02 150 readme.md
-a---- 2024/1/29 9:02 444 tsconfig.json
-a---- 2024/1/29 9:02 27893 tsconfig.tsbuildinfo
PS C:\Users\5800h\Desktop\work\temp\koishi-temp\external\test>
(大型悄悄话现场))))
悄悄话总结:
yarn build --clean
来清除旧的构建 map 重新构建感谢dalao)))解决哩!
为什么我可以看见你们的悄悄话
原来活跃用户还有这种特权
怎么你们都是活跃用户