0
0
Svelteframework~20 mins

Project setup with create-svelte - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Svelte Project Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the create-svelte command
What does the command npm create svelte@latest do when setting up a new Svelte project?
AIt installs Svelte globally on your system for all projects.
BIt updates an existing Svelte project to the latest version.
CIt runs the Svelte development server immediately without creating any files.
DIt initializes a new Svelte project by downloading the latest template and guiding you through setup options.
Attempts:
2 left
💡 Hint
Think about what 'create' commands usually do in project setups.
component_behavior
intermediate
2:00remaining
Result of skipping TypeScript during setup
If you run npm create svelte@latest and choose no when asked about TypeScript support, what will be true about your project?
AThe project will use plain JavaScript files without TypeScript syntax or type checking.
BThe project will still include TypeScript files but without type checking enabled.
CThe project will fail to build because TypeScript is required.
DThe project will convert all TypeScript files to JavaScript automatically.
Attempts:
2 left
💡 Hint
Consider what happens when you decline TypeScript in a setup wizard.
📝 Syntax
advanced
2:00remaining
Correct command to create a Svelte project with npm
Which of the following commands correctly creates a new Svelte project using the latest create-svelte template?
Anpm create svelte my-app
Bnpm init svelte@latest my-app
Cnpm create svelte@latest my-app
Dnpm install create-svelte@latest my-app
Attempts:
2 left
💡 Hint
Focus on the official recommended command syntax for create-svelte.
🔧 Debug
advanced
2:00remaining
Error caused by missing dependencies after create-svelte
After running npm create svelte@latest and choosing options, you try to run npm run dev but get an error about missing modules. What is the most likely cause?
AYou forgot to run <code>npm install</code> to install dependencies before running the dev server.
BThe create-svelte command failed to create the project folder.
CYou need to run <code>npm update</code> before <code>npm run dev</code>.
DYour Node.js version is too new and incompatible with Svelte.
Attempts:
2 left
💡 Hint
Think about what step installs packages after project creation.
state_output
expert
2:00remaining
Number of files created by default with create-svelte
After running npm create svelte@latest and accepting all default options, how many files (not folders) are created in the root of the new project folder?
A7
B9
C11
D5
Attempts:
2 left
💡 Hint
Count files like package.json, README.md, config files, and main source files.