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
nuxi genetate with wrong baseURL to _payload.js #15134
Comments
I believe this has already been resolved via nuxt/framework#7809. Would you confirm by testing with the edge channel? |
I trie to confirm in the edge channel, but when i reinstall dependecis, i got the errors below. $ npm i --registry=https://registry.npmjs.com/
> postinstall
> nuxt prepare
Nuxi 3.0.0-rc.9-27702110.abd5dc5 12:10:34
ERROR defineNuxtConfig is not defined 12:10:34
at nuxt.config.ts:2:16
at Object.jiti (node_modules/jiti/dist/jiti.js:1:247502)
at resolveConfig (node_modules/c12/dist/index.mjs:220:21)
at loadConfig (node_modules/c12/dist/index.mjs:104:40)
at async loadNuxtConfig (node_modules/nuxt/node_modules/@nuxt/kit/dist/index.mjs:678:18)
at async loadNuxt (node_modules/nuxt/dist/index.mjs:1563:19)
at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:732:19)
at async Object.invoke (node_modules/nuxi/dist/chunks/prepare.mjs:29:18)
at async _main (node_modules/nuxi/dist/cli.mjs:50:20)
npm ERR! code 1
npm ERR! path /Users/vm/Code/test
npm ERR! command failed
npm ERR! command sh -c nuxt prepare
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vm/.npm/_logs/2022-10-12T04_10_32_934Z-debug-0.log |
It looks like you are not using the latest edge version - you seem to be using an edge version from rc9. Here's a reproduction of everything working fine with latest edge version: https://stackblitz.com/edit/github-vtrl2t. I'm going to close this issue, tentatively, but if you can provide a reproduction with an issue I will very happily reopen it. 🙏 |
Environment
Darwin
v16.17.0
3.0.0-rc.11
0.5.4
npm@8.15.0
vite
-
-
-
Reproduction
https://stackblitz.com/edit/github-egtlnd-lkqx3b?file=nuxt.config.ts
nuxt@3.0.0-rc.11 with config
app.baseURL
Describe the bug
I made configuration of
app.baseURL
with/sub-path/
, and tried to usenpm run generate
to build static site.I get result of the *.html in ./dist directory show that:
_paylaod.js
get the wrong pathIt will lead to a 404 error when i deploy these file to my site.
Additional context
https://github.com/nuxt/framework/blob/ed1c704835c280cd2d7ad795452f2da9c8401e2a/packages/nuxt/src/core/runtime/nitro/renderer.ts#L191
The
payloadURL
is resolve incorrect.Logs
No response
The text was updated successfully, but these errors were encountered: