Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to initialize a new Astro project for deployment.
Astro
npm init astro@latest [1]Attempts:
3 left
💡 Hint
Common Mistakes
Using '--force' which forces actions but is not needed here.
Using '--skip-install' which skips installing dependencies.
Using '--help' which only shows help information.
✗ Incorrect
Using '--yes' initializes the project with default settings quickly.
2fill in blank
mediumComplete the command to install the Vercel CLI globally.
Astro
npm install -g [1]Attempts:
3 left
💡 Hint
Common Mistakes
Installing 'astro' which is the framework, not the deployment CLI.
Installing 'netlify-cli' or 'firebase-tools' which are for other platforms.
✗ Incorrect
The 'vercel' package is the official CLI for deploying to Vercel.
3fill in blank
hardFix the error in the deployment command to correctly deploy the project.
Astro
vercel [1]Attempts:
3 left
💡 Hint
Common Mistakes
Using '--production' which is not recognized by Vercel CLI.
Using '--preview' which relates to preview deployments.
Using '--deploy' which is not a valid flag.
✗ Incorrect
The correct flag to deploy to production is '--prod'.
4fill in blank
hardFill both blanks to configure the Astro project for Vercel deployment in the config file.
Astro
export default {
adapter: [1](),
vite: {
build: {
target: '[2]'
}
}
}Attempts:
3 left
💡 Hint
Common Mistakes
Using 'netlifyAdapter' which is for a different platform.
Using 'esnext' which may cause compatibility issues.
✗ Incorrect
Use 'vercel()' for Vercel and set build target to 'ES2020' for compatibility.
5fill in blank
hardFill all three blanks to create a deployment script in package.json for Vercel.
Astro
"scripts": { "deploy": "[1] && [2] --prod [3]" }
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'npm run build' instead of 'astro build' which is the Astro build command.
Omitting '--confirm' which causes interactive prompts.
✗ Incorrect
First build with 'astro build', then deploy with 'vercel --prod --confirm' to skip prompts.
