You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very brief. We created a meta-framework on Qwik and Qwik-City. Then we reported #5281. And it did not get solved. We managed to work around it (abandoning some features). Yet now we're stuck again.
This is the problem. We have a signin page, and when we click on the button, we get this error:
Uncaught (in promise) TypeError: Failed to resolve module specifier "QuestionParts". Relative references must start with either "/", "./", or "../".
We can't create an MRE. We have tried tens of times with no success.
But this time we did something different:
Ran npm run build and node server/entry.express.js in the development environment. The problem is not there.
We compared our code inside the dev docker container, with the code in our CI/CD. There were some differences, but we mitigated those differences (for example having 404.tsx in the development but not in the CI/CD as it causes SSG problems). Yet the CI/CD code still gave us that error.
Then we did one strange thing. Built our code in our CI/CD but without specifying ENV NODE_ENV production and copy/pasted CI/CD code just after build alongside the original source code into the development container. It did not work as expected. The node server/entry.express.js gave us that error.
Now we simply removed build directories rm -rf dist && rm -rf server && rm -rf tmp and ran npm run build on the same code inside our dev container. It worked.
This is an image using the Beyond Compare. Left side is the code that does not work. Right side is the same code that works:
As you can see, the only difference is the dist and server and tmp directories. And when we used grep -rl QuestionParts this is what we get:
As you can see, for the version that does not work, the QuestionParts is built into an additional file. But for the version that works it's not built into its own file.
Now we use our own dev image for building in our CI/CD pipeline. This means that both are built using the same NODE_ENV and using the same node_modules. Even you can see that both node_modules directories are symbolic links.
I can't find out why it is so. The question is, why do we not get deterministic build outputs for the:
Exactly the same source code (even inside the same directory)
Both on containers created from the same docker image
The reproduction is not simple. Because we have no idea where the problem lies. The specified reproduction is not a real MRE. It's code from our real project. Yet if you would like I can manage to work it out with you and give you a demonstration or send you a film.
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
Very brief. We created a meta-framework on Qwik and Qwik-City. Then we reported #5281. And it did not get solved. We managed to work around it (abandoning some features). Yet now we're stuck again.
This is the problem. We have a
signin
page, and when we click on the button, we get this error:We can't create an MRE. We have tried tens of times with no success.
But this time we did something different:
npm run build
andnode server/entry.express.js
in the development environment. The problem is not there.ENV NODE_ENV production
and copy/pasted CI/CD code just after build alongside the original source code into the development container. It did not work as expected. Thenode server/entry.express.js
gave us that error.rm -rf dist && rm -rf server && rm -rf tmp
and rannpm run build
on the same code inside our dev container. It worked.This is an image using the
Beyond Compare
. Left side is the code that does not work. Right side is the same code that works:As you can see, the only difference is the
dist
andserver
andtmp
directories. And when we usedgrep -rl QuestionParts
this is what we get:As you can see, for the version that does not work, the
QuestionParts
is built into an additional file. But for the version that works it's not built into its own file.Now we use our own dev image for building in our CI/CD pipeline. This means that both are built using the same
NODE_ENV
and using the samenode_modules
. Even you can see that bothnode_modules
directories are symbolic links.I can't find out why it is so. The question is, why do we not get deterministic build outputs for the:
NODE_ENV=production
node_modules
Reproduction
https://github.com/Nefcanto/QwikModuleSpecifier
Steps to reproduce
The reproduction is not simple. Because we have no idea where the problem lies. The specified reproduction is not a real MRE. It's code from our real project. Yet if you would like I can manage to work it out with you and give you a demonstration or send you a film.
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: