Open nickelnext opened 1 year ago
We are approaching the Nuxt 2 EOL date (June 30, 2024) - see this article for more information. This is advance warning that I'm going to close this issue then, as it's currently marked as a Nuxt 2 related bug.
If it's a critical or security issue, please do comment and let me know, in case it is possible to address it before the EOL date.
If it's a an issue you think is relevant for Nuxt 3, please feel free to open a fresh issue (or just comment here so I can update labels, etc.). 🙏
Thank you for your understanding and for your contribution to Nuxt. ❤️
Versions
Reproduction
Here is the
package.json
extractHere is the
nuxt.config.js
extract(as you see i cleared the modules array so everything should be bundled with --standalone, if i got it right)
Here is the
index.js
extract, where i start the app with nuxt-start as found somewhere on github/stackoverflow (documentation on nuxtjs.org is basically zero on this matter)Steps to reproduce
Configure a pipeline on DevOps that does
npm install
andnpm run build
, so that the Agent creates a Standalone package. Then copy all the files and zip them to an archive and create the dropCreate a Release pipeline that takes the drop and deploys to a Linux Azure WebApp, which can run
npm i nuxt-start
andnpm run start
the installation of npm install nuxt-start 2.15.8 fails somehow saying that the renaming of some node_modules doesn't work. So i have these folders installed on the WebApp
but when i try to do the npm run start i get "nuxt not found"
What is Expected?
The main goal is to make use of --standalone, since no guide on the internet mention --standalone at all, and what happens is that everyone is doing this:
This is nonsense, because we do npm install twice while the entire bundled package should be ready already. So there's a huge flaw in the process, and i found and followed this kind of approach everywhere until i got a devops pipe that takes 14 minutes, and i can't take it anymore.
Since I know there's the --standalone flag, we should be able to make it work also on Azure.
I tried on my pc to:
It works perfectly and at least nuxt start is lightweight. Of course on my machine i can also install nuxt-start as a -g package which means that i don't need to re-install it every time. But that's not doable on DevOps.
I tried to do the same on DevOps, and it doesn't work. So here's the deal: either i'm doing something completely wrong, or there's a major flaw in the documentation and in the flow itself.
Can you point me to the right direction and make this information finally available to the world? As nobody, literally nobody, has the real solution explained anywhere. And I'm talking about a real project, not a "nuxt-start-app" that has below-zero complexity. I believe i'm not the only one having dozens of nuxt.js apps on Azure and they're still all relying on npm install on the actual machine which is completely nuts.
Best regards