Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to run a package using npx.
Node.js
npx [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install' after npx instead of a package name.
Trying to run 'npm' with npx which is incorrect.
✗ Incorrect
Using 'npx create-react-app' runs the create-react-app package without installing it globally.
2fill in blank
mediumComplete the command to run a specific version of a package with npx.
Node.js
npx [1]@5.0.0 my-app
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'npm' instead of the package name.
Omitting the version number or placing it incorrectly.
✗ Incorrect
You specify the package and version with '@version' after the package name in npx.
3fill in blank
hardFix the error in the command to run a package with npx.
Node.js
npx [1] --version Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Including 'npm install' after npx.
Trying to run 'npx' inside npx command.
✗ Incorrect
You should only put the package name after npx, not commands like 'npm install'.
4fill in blank
hardFill both blanks to run a package with arguments using npx.
Node.js
npx [1] [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'node' instead of the package name.
Putting the filename instead of an argument.
✗ Incorrect
You run 'eslint' with the '--fix' argument to automatically fix problems.
5fill in blank
hardFill all three blanks to run a package with a script and an argument using npx.
Node.js
npx [1] [2] [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'eslint' instead of 'jest' for tests.
Mixing up flags and filenames.
✗ Incorrect
You run 'jest' with the '--watch' flag on 'test-file.js' to watch tests.