-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"npm build" is not working correctly on Windows #1558
Comments
That sounds strange... Probably because of : #1541 But it works well on my dev machine, on jenkins and on github action. (but this is all linux) I haven't window machine so I can test that. |
When I starting $ vite build --emptyOutDir
vite v5.0.2 building for production...
transforming (510) src\components\values\input\DateTimeValueInput.vue |
And with your workaround it works ? |
Yes - works 😉 |
In our code base, I think code about leshan/leshan-server-demo/webapp/vite.config.js Lines 29 to 31 in caf3f35
leshan/leshan-server-demo/webapp/vite.config.js Lines 62 to 71 in caf3f35
Maybe you can try to investigate around this to see ? |
I check vite repository to see If there was some issue opened which could looks like to that, I didn't see anything... But maybe you can try to get last vite version:
|
Maybe also a |
OK too bad that we didn't succeed to solve this. 😞 Hoping that maybe another contributor will be able to investigate 🤞 |
I'm afraid that only Magda and me are using Windows in leshan development. I going to return to this issue after finish #1089 |
…dows hangs during "transforming" step
…dows hangs during "transforming" step
After deeper investigation I found that on Windows "yarn build" command stops because node.exe is looking for file package.json in leshan-server-core-demo subdirectory. Because this file is not present in this directory node is continuing search in the every directories up to the root level ( |
Thx for looking at this.
This still looks like a workaround but this is a better one.
Why do it search that ? 🤔 |
I checked the paths and they look OK: Windows dirname: C:\Users\Jarek\IdeaProjects\leshan_JaroslawLegierski_repo\leshan-server-demo\webapp
MAVEN_OUTPUT_DIR: undefined
outputDir: ../target/dist
@: C:\Users\Jarek\IdeaProjects\leshan_JaroslawLegierski_repo\leshan-server-demo\webapp\src
@leshan-server-core-demo: C:\Users\Jarek\IdeaProjects\leshan_JaroslawLegierski_repo\leshan-server-core-demo\webapp\src Linux dirname: /root/leshan/leshan-server-demo/webapp
MAVEN_OUTPUT_DIR: undefined
outputDir: ../target/dist
@: /root/leshan/leshan-server-demo/webapp/src
@leshan-server-core-demo: /root/leshan/leshan-server-core-demo/webapp/src
It looks like the situation described in this article |
About checking path, maybe you should check for
This explain how nodejs search module using |
I added Windows Linux in both cases paths are correct. I will ask our frontend developers if they encountered a similar problem .... |
We recently move from yarn classic to npm but issue is still there. We move a bit forward on this topic, see #1680 and especially : |
I tested the Leshan build process on 5 different PCs with Windows (10 and 11), and the conclusion is as follows: Issue 0 hang up on "[INFO] transforming..." Issue 1 (environment variable substitution) described here I corrected by proposed by you cross-env npm plugin. Issue 2 (old NPM bug) was related to the previously used run-script-os plugin and does not appear anymore. it seems that the Issue 0 is related to the Windows configuration or the software installed on the PC. |
Last update - this small modification resolves the problem with the Leshan build process on Windows. |
Oh great ! Could you provide a PR about that :) |
Done in #1691 |
#1691 is now integrated in @JaroslawLegierski Thx a lot for you help on that topic 🙏 ! |
Question
When I building project (latest master) on Windows (Windows 10 Pro 22H2) process node.exe hangs during following command execution:
[INFO] Running 'yarn build' in C:\ ..... repo\leshan\leshan-server-demo\webapp [INFO] yarn run v1.22.19 [INFO] $ vite build --emptyOutDir [INFO] vite v5.0.2 building for production... [INFO] transforming...
During the Windows system trace, I noticed that node.exe was looking for a file package.json in C:\
I found temporary workaround by coping package.json from \leshan-server-demo\webapp\ to the C:\ 😉
The text was updated successfully, but these errors were encountered: