less
less
NNuxt
Created by less on 4/12/2024 in #❓・help
Cannot start nuxt: Unexpected token ':'
Hi, i've got this error whenever i tried to start the nuxt app
Cannot start nuxt: Unexpected token ':' 4:44:34 PM

at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:118:18)
at callTranslator (node:internal/modules/esm/loader:273:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:30)
Cannot start nuxt: Unexpected token ':' 4:44:34 PM

at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:118:18)
at callTranslator (node:internal/modules/esm/loader:273:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:30)
here's my nuxt.config
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: ["@nuxt/ui", "@vueuse/nuxt"],
build: {
transpile: ["@syncfusion"],
},
vite: {
optimizeDeps: {
exclude: ["@syncfusion/ej2-vue-charts"],
},
},
});
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: ["@nuxt/ui", "@vueuse/nuxt"],
build: {
transpile: ["@syncfusion"],
},
vite: {
optimizeDeps: {
exclude: ["@syncfusion/ej2-vue-charts"],
},
},
});
1 replies
NNuxt
Created by less on 5/3/2023 in #❓・help
useFetch is not defined in server/api
No description
7 replies
NNuxt
Created by less on 5/2/2023 in #❓・help
get started with nuxt 3 but get nuxt 2
i've try to make a new project using nuxt 3 cli with this command
npx nuxi@latest init my-app
npx nuxi@latest init my-app
when done npm install , i caught an error "defineNuxtConfig" is not defined. i tried to see the nuxt version using npx nuxi info. then i got this
------------------------------
- Operating System: Darwin
- Node Version: v18.16.0
- Nuxt Version: 2.15.8
- Nitro Version: 2.3.3
- Package Manager: [email protected]
- Builder: webpack
- User Config: -
- Runtime Modules: -
- Build Modules: -
------------------------------
------------------------------
- Operating System: Darwin
- Node Version: v18.16.0
- Nuxt Version: 2.15.8
- Nitro Version: 2.3.3
- Package Manager: [email protected]
- Builder: webpack
- User Config: -
- Runtime Modules: -
- Build Modules: -
------------------------------
instead got nuxt 3 , i got nuxt 2. can someone help me?
17 replies
NNuxt
Created by less on 5/1/2023 in #❓・help
pending in useFetch vs useLazyFetch
Hello, im quite new to nuxt ( < 1 Year developing with nuxt ) , i have a question what is the difference between pending in useFetch vs useLazyFetch since both of them have the pending return value
3 replies
NNuxt
Created by less on 4/22/2023 in #❓・help
Volar couldn't create connection to server.
While open my vscode, i got notification that say Vue Semantic Server client: couldn't create connection to server. with output
Server initialization failed.
Message: Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in /Users/asd/.vscode/extensions/ms-vscode.vscode-typescript-next-5.1.20230421/extensions/node_modules/typescript/lib
Code: -32603


[Error - 4:31:28 AM] Vue Semantic Server client: couldn't create connection to server.
Message: Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in /Users/asd/.vscode/extensions/ms-vscode.vscode-typescript-next-5.1.20230421/extensions/node_modules/typescript/lib
Code: -32603
Server initialization failed.
Message: Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in /Users/asd/.vscode/extensions/ms-vscode.vscode-typescript-next-5.1.20230421/extensions/node_modules/typescript/lib
Code: -32603


[Error - 4:31:28 AM] Vue Semantic Server client: couldn't create connection to server.
Message: Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in /Users/asd/.vscode/extensions/ms-vscode.vscode-typescript-next-5.1.20230421/extensions/node_modules/typescript/lib
Code: -32603
3 replies
NNuxt
Created by less on 3/30/2023 in #❓・help
how to refetch and reload only component after deleting
I've want to reload my component so the data is updated after deleting through api call
2 replies
NNuxt
Created by less on 3/23/2023 in #❓・help
Accessing Object get undefined
Currently i'm accessing the object through this
{{data.jumbotronImage}}
{{data.jumbotronImage}}
it shown
{ "data": { "id": 1, "attributes": { "name": "wedding.png", "alternativeText": null, "caption": null, "width": 599, "height": 580, "formats": { "thumbnail": { "name": "thumbnail_wedding.png", "hash": "thumbnail_wedding_ab2be20afd", "ext": ".png", "mime": "image/png", "path": null, "width": 161, "height": 156, "size": 54.02, "url": "/uploads/thumbnail_wedding_ab2be20afd.png" }, "small": { "name": "small_wedding.png", "hash": "small_wedding_ab2be20afd", "ext": ".png", "mime": "image/png", "path": null, "width": 500, "height": 484, "size": 417.07, "url": "/uploads/small_wedding_ab2be20afd.png" } }, "hash": "wedding_ab2be20afd", "ext": ".png", "mime": "image/png", "size": 144.91, "url": "/uploads/wedding_ab2be20afd.png", "previewUrl": null, "provider": "local", "provider_metadata": null, "createdAt": "2023-03-23T06:45:30.385Z", "updatedAt": "2023-03-23T06:45:30.385Z" } } }
{ "data": { "id": 1, "attributes": { "name": "wedding.png", "alternativeText": null, "caption": null, "width": 599, "height": 580, "formats": { "thumbnail": { "name": "thumbnail_wedding.png", "hash": "thumbnail_wedding_ab2be20afd", "ext": ".png", "mime": "image/png", "path": null, "width": 161, "height": 156, "size": 54.02, "url": "/uploads/thumbnail_wedding_ab2be20afd.png" }, "small": { "name": "small_wedding.png", "hash": "small_wedding_ab2be20afd", "ext": ".png", "mime": "image/png", "path": null, "width": 500, "height": 484, "size": 417.07, "url": "/uploads/small_wedding_ab2be20afd.png" } }, "hash": "wedding_ab2be20afd", "ext": ".png", "mime": "image/png", "size": 144.91, "url": "/uploads/wedding_ab2be20afd.png", "previewUrl": null, "provider": "local", "provider_metadata": null, "createdAt": "2023-03-23T06:45:30.385Z", "updatedAt": "2023-03-23T06:45:30.385Z" } } }
But, whenever i try to access the
{{data.jumbtronImage.data}}
{{data.jumbtronImage.data}}
error 500 Cannot read properties of undefined (reading 'data') is all i got. am i missing something?
29 replies