routify
routify copied to clipboard
<!-- routify:options bundle=true --> make app error
bug description
when put <!-- routify:options bundle=true -->
in pages/_layout.svelte
, it build ok, but error happend when visit it.
if remove this, it works.
Error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'name')
at $e (vendor.f4667ffd.js:4:9323)
at Object.Un.e.$$.update (vendor.f4667ffd.js:4:23245)
at an (vendor.f4667ffd.js:4:2556)
at je (vendor.f4667ffd.js:4:2308)
vendor.f4667ffd.js:4:9323
s=e.componentFile.name.replace(/Proxy<_?(.+)>/,"$1").replace(/^Index$/,e.component.shortPath.split("/").pop())
vite.config.js
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import { resolve } from 'path';
const production = process.env.NODE_ENV === 'production'
export default defineConfig({
server: {
port: 5000
},
plugins: [
svelte({
emitCss: true,
compilerOptions: {
dev: !production,
},
})
],
resolve: {
alias: {
$api : resolve('./src/api'),
$components : resolve("./src/components")
}
}
});
version Routify 2.18.4, Svelte 3.46.1, vite 2.7.12
screenshot
I download https://github.com/roxiness/routify-starter
and add <!-- routify:options bundle=true -->
to pages/_layout.svelte
the same error occured.
Hi. Would you be able to provide a minimal reproducible for this?
Hi. Would you be able to provide a minimal reproducible for this?
I download https://github.com/roxiness/routify-starter and add <!-- routify:options bundle=true -->
to pages/_layout.svelte
build & preview, the same error occured.
https://github.com/oschina/routify-starter
Here is my demo project , only modify src/public/_layout.svelte to <!-- routify:options bundle=true -->
npm install npm run build npm run preview
open http://localhost:5000
then error happened
Same problem here with the routify-starter.
When i execute
npm run dev
I get the following error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'name') at suppressComponentWarnings (index.js:66:34) at Object.$$self.$$.update (Route.svelte? [sm]:106:18) at update (index.mjs:1071:12) at flush (index.mjs:1042:13)
@jakobrosenberg @ghostdevv Any updates on this? I am facing similar issue!
I am facing this as well, and removing <!-- routify:options bundle=true -->
allows the site to run.
Environment:
This should be fixed in 2.18.9. Sorry about the delay.
It works now, I appreciate it!