Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/patterns/Hero/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const t = useTranslations(lang);

const expressPackage = await getEntry('npm', 'express');
const EXPRESS_VERSION = expressPackage?.data.version ?? '5.x';
const INSTALL_COMMAND = 'npm install express --save';
const EXAMPLE_CODE = `const express = require('express')
const INSTALL_COMMAND = 'npm install express';
const EXAMPLE_CODE = `const express = require('express');
const app = express()
const port = 3000

Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/en/5x/starter/installing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ To install Express temporarily and not add it to the dependencies list:
```bash
npm install express --no-save
```

<Alert type="info">
For npm version 5.0.0 and above, <code>npm install express</code> automatically adds the package
to your <code>dependencies</code>. Explicit use of the <code>--save</code> flag is optional and
mainly kept for reference purposes.
</Alert>
2 changes: 1 addition & 1 deletion tests/e2e/homepage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ test.describe('Homepage Content', () => {
test('should display the installation command', async ({ page }) => {
const installCode = page.getByTestId('install-command');
await expect(installCode).toBeVisible();
await expect(installCode).toContainText(/npm install express --save/i);
await expect(installCode).toContainText(/npm install express/i);
});

test('should have a working "Get Started" call to action', async ({ page }) => {
Expand Down
Loading