question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sveltekit: Can't serve newly generated app

See original GitHub issue

Describe the bug After I generated a new app with nx g @nxext/sveltekit:app my-app, I get an error when trying to serve the app with npx nx serve my-app:

> nx run my-app:serve

 >  NX   Cannot read properties of undefined (reading 'length')

TypeError: Cannot read properties of undefined (reading 'length')
    at interpolateArgsIntoCommand (/Users/el_stefano/Documents/Development/nx-test/my-app/node_modules/nx/src/executors/run-commands/run-commands.impl.js:193:47)
    at /Users/el_stefano/Documents/Development/nx-test/my-app/node_modules/nx/src/executors/run-commands/run-commands.impl.js:106:21
    at Array.forEach (<anonymous>)
    at normalizeOptions (/Users/el_stefano/Documents/Development/nx-test/my-app/node_modules/nx/src/executors/run-commands/run-commands.impl.js:104:22)
    at /Users/el_stefano/Documents/Development/nx-test/my-app/node_modules/nx/src/executors/run-commands/run-commands.impl.js:41:28
    at Generator.next (<anonymous>)
    at fulfilled (/Users/el_stefano/Documents/Development/nx-test/my-app/node_modules/tslib/tslib.js:115:62)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

I created a nest app in the same workspace and it works.

To Reproduce Steps to reproduce the behavior:

  1. Generate new app with nx g @nxext/sveltekit:app my-app.
  2. Serve the app with npx nx serve my-app

Expected behavior npx nx serve my-app serves the app

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:9

github_iconTop GitHub Comments

1reaction
lucastnrcommented, Dec 10, 2022

Got this same error today. Thanks for the workaround @luechtdev

1reaction
ChristopherLMillercommented, Sep 4, 2022

Getting the same error, any work around for now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot run a newly created project · Issue #2001 · sveltejs/kit
I can't reproduce this with pnpm dev or pnpm build when using the static adapter, for either the JS- or TS-based demo app....
Read more >
Introduction • Docs • SvelteKit
SvelteKit is a framework for rapid development of robust, performant web applications. Building an app with all the modern best practices is fiendishly ......
Read more >
SvelteKit Node App Deploy: Linux Cloud Hosting | Rodney Lab
In the example we look at, we use the sharp package to resize images and also to generate next-gen format images on our...
Read more >
How to Return File from SvelteKit Endpoint - Stack Overflow
The static folder works, but it is not meant to carry application data—files in this folder represent new routes that are served directly...
Read more >
Authentication in Svelte using cookies - LogRocket Blog
Create a Svelte app using SvelteKit that implements a cookie for authentication. ... which was created by the svelte-add command:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found