vikejs / vike

🔨 Flexible, lean, community-driven, dependable, fast Vite-based frontend framework.
https://vike.dev
MIT License
4.39k stars 352 forks source link

Cannot build project #1887

Closed EugenPrinz closed 2 months ago

EugenPrinz commented 2 months ago

Description

I created a test project through npm create bati mainframe-ssrv2 -- --react --authjs --express --prisma --eslint --prettier and I can’t build it, I don’t understand why the config file is blocked.

npm run dev - Works intermittently npm cache verify - It doesn't always help

error during build:
Error: EBUSY: resource busy or locked, unlink 'C:\Workspace\Webstorm\mainframe-ssrv2\pages\todo\+config.ts.build-47bf93auo05g.mjs'
    at Object.unlinkSync (node:fs:1876:11)
    at clean (file:///C:/Workspace/Webstorm/mainframe-ssrv2/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAnd
ExecuteFile.js:238:28)
    at executeTranspiledFile (file:///C:/Workspace/Webstorm/mainframe-ssrv2/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeCon
fig/transpileAndExecuteFile.js:244:9)
    at transpileAndExecuteFile (file:///C:/Workspace/Webstorm/mainframe-ssrv2/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeC
onfig/transpileAndExecuteFile.js:33:29)
    at loadConfigFile (file:///C:/Workspace/Webstorm/mainframe-ssrv2/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/loa
dFileAtConfigTime.js:37:29)
    at file:///C:/Workspace/Webstorm/mainframe-ssrv2/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js:101:52
    at async Promise.all (index 1)
    at loadInterfaceFiles (file:///C:/Workspace/Webstorm/mainframe-ssrv2/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig
.js:96:5)
    at loadVikeConfig (file:///C:/Workspace/Webstorm/mainframe-ssrv2/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js:
236:40)
    at loadVikeConfig_withErrorHandling (file:///C:/Workspace/Webstorm/mainframe-ssrv2/node_modules/vike/dist/esm/node/plugin/plugins/importUserCode/v1-design
/getVikeConfig.js:198:15)
brillout commented 2 months ago

I cannot reproduce. It seems to be some kind of Windows quirk that is unrelated to Vike? Is there anything Vike can do to workaround it? Closing, but let's continue the conversation.

EugenPrinz commented 2 months ago

I cannot reproduce. It seems to be some kind of Windows quirk that is unrelated to Vike? Is there anything Vike can do to workaround it? Closing, but let's continue the conversation.

Maybe something happened when reinstalling the operating system, I had to set a delay of 1 millisecond in the executeTranspiledFile method, after which the build completed successfully.

I found the reason, the problem was in the webstorm plugin.

Sorry for disturbing you.

brillout commented 2 months ago

the problem was in the webstorm plugin

Good to know, can you elaborate or link to a relevant resource?