Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to run angular v17 "ng s" need guidance #26508

Closed
Tweniee opened this issue Nov 27, 2023 · 4 comments
Closed

Not able to run angular v17 "ng s" need guidance #26508

Tweniee opened this issue Nov 27, 2023 · 4 comments
Labels
needs: more info Reporter must clarify the issue

Comments

@Tweniee
Copy link

Tweniee commented Nov 27, 2023

Which @angular/* package(s) are the source of the bug?

platform-server, zone.js

Is this a regression?

Yes

Description

Nodejs -v: v18.18.2/v20.10.0
ng v: 17.0.0

I'm experiencing issues running ng s after trying various versions of v17 when creating a new project. Any assistance would be appreciated.
image

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

✘ [ERROR] Could not resolve "zone.js/node"

    angular:polyfills-server:angular:polyfills-server:1:7:
      1 │ import 'zone.js/node';
        ╵        ~~~~~~~~~~~~~~

  The Yarn Plug'n'Play manifest forbids importing "zone.js" here because it's not listed as a dependency of this package:

    ../../../.pnp.cjs:36:31:
      36 │         "packageDependencies": [\
         ╵                                ~~

  You can mark the path "zone.js/node" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.


✘ [ERROR] Could not resolve "@angular/platform-server/init"

    angular:polyfills-server:angular:polyfills-server:2:7:
      2 │ import '@angular/platform-server/init';
        ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  The Yarn Plug'n'Play manifest forbids importing "@angular/platform-server" here because it's not listed as a dependency of this package:

    ../../../.pnp.cjs:36:31:
      36 │         "packageDependencies": [\
         ╵                                ~~

  You can mark the path "@angular/platform-server/init" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.


Application bundle generation failed. [9.153 seconds]
Watch mode enabled. Watching for file changes...

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 17.0.3
Node: 20.10.0
Package Manager: npm 10.2.3
OS: linux x64

Angular: 17.0.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.3
@angular-devkit/build-angular   17.0.3
@angular-devkit/core            17.0.3
@angular-devkit/schematics      17.0.3
@angular/cli                    17.0.3
@angular/platform-server        14.3.0
@angular/ssr                    17.0.3
@schematics/angular             17.0.3
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.13.3

Anything else?

No response

@JeanMeche
Copy link
Member

Hi, can you check what was mentionned in #26318 ?
There is likely a pnp.cjs file on your computer.

@alxhub alxhub transferred this issue from angular/angular Nov 27, 2023
@clydin clydin added the needs: more info Reporter must clarify the issue label Nov 27, 2023
@alan-agius4
Copy link
Collaborator

Duplicate of #26318

@alan-agius4 alan-agius4 marked this as a duplicate of #26318 Nov 28, 2023
@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
@Truenotierra73
Copy link

@Tweniee In my case, I was using Yarn and it gave me problems with the pnp.cjs file. In the root directory of my operating system (Windows 11), I saw that file and deleted it. Then, with pnpm the project worked correctly.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: more info Reporter must clarify the issue
Projects
None yet
Development

No branches or pull requests

5 participants