Skip to content

Can't start Angular Starter project #1055

@IArnaut2

Description

@IArnaut2

Describe the bug

I have been watching Angular Getting Started tutorial. I have generated a sample project and installed dependencies. But the project couldn't start after ng serve at all. Here is the error:

$ ng serve
Unknown error: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/projects/m7nmdq/node_modules/cliui/node_modules/string-width/index.js from /home/projects/m7nmdq/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /home/projects/m7nmdq/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.

~/projects/m7nmdq 56s

Link to the blitz that caused the error

https://stackblitz.com/edit/m7nmdq?file=src%2Fmain.ts

Steps to reproduce

  1. Generate a ready-made Angular sample project
  2. Log in
  3. Fork the generated project
  4. Install dependencies
  5. Start with 'ng serve'
  6. Error

Expected behavior

The project should just start.

Parity with Local

Screenshots

image

Platform

  • OS: Windows 10 64-bit
  • Browser: Firefox
  • Version: 112.02

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtracked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions