nodejs.org: Unable to Run Node.js Website Locally on Windows 11 with Node.js 18.18.0 and npm 9.8.1

URL:

https://github.com/nodejs/nodejs.org

Browser Name:

Brave

Browser Version:

v1.58.135

Operating System:

Windows 11, 22H2, 22621.2283

How to reproduce the issue:

Problem: I am encountering difficulties when trying to run the Node.js Website locally on my Windows 11 machine using Node.js version 18.18.0 and npm version 9.8.1. The local development environment is not working as expected.

Steps to Reproduce:

  1. Clone the Node.js Website repository.
  2. Run npm ci to install project dependencies.
  3. Attempt to start the local preview with npx turbo serve.

Expected Behavior: The local development environment should start without errors, allowing me to preview my changes.

Actual Behavior:

npm ci

Screenshot (1286)

npx turbo serve

Screenshot (1287)

Environment:

  • Operating System: Windows 11
  • Node.js Version: 18.18.0
  • npm Version: 9.8.1

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 43 (43 by maintainers)

Most upvoted comments

One final query, what does .npmrc file do or why it is added or removed? @ovflowd

.npmrc is a NPM configuration file that allows you to override default NPM settings. The issue that comes from that specific issue, is that since NPM v7, peerDependencies (which react is one) are installed automatically alongside regular dependencies.

With the legacy-peer-deps they won’t. Hence why react did not get installed.

More details: https://github.com/npm/cli/issues/4934

Thank you so much for guiding me, and hats off to your patience @ovflowd 👏

Of course 😃 Here to help!

image image

Here we go, now it’s working absolutely fine ✨

Yeah seems alright now, feel free to try npx turbo serve

It’s okay leave, I am using GitHub codespace to run it locally, see @ovflowd this is how it looks ✨

Screenshot (1299)

Screenshot (1300)

Codespaces saves the day, but Id still love to get to the bottom of it 😅

As Im genuinely curious what could be causing this 🫠

No worries. Hopefully you figure out what’s wrong

have you try to use npm I ? it’s can change something 🤔

Screenshot (1290)

Check this once @AugustinMauroy

This is fine. We manually disable Next.js telemtry.

what is the change do in your branch ?

Screenshot (1295) Screenshot (1296) Screenshot (1297) Screenshot (1298)

These are automatically generated when I try to install and run it.

The changes on package-lock should not be done. The files on public are generated automatically and that’s fine. The changes on the VS Code settings are due to you probably altering it. Either by accepting/rejecting a VS Code prompt.