Skip to content

Ng serve fails with Yarn and the -ng4 flag #4787

@Ionaru

Description

@Ionaru

OS?

Lubuntu 16.10

Versions.

@angular/cli: 1.0.0-beta.32.3
node: 7.5.0
os: linux x64

Repro steps. (On a clean VM)

sudo yarn global add @angular/cli
ng set --global packageManager=yarn
ng new MyYarnApp -ng4
cd MyYarnApp
ng serve or ng build

or

sudo yarn global add @angular/cli
ng new MyYarnApp -ng4 --skip-install
cd MyYarnApp
yarn
ng serve or ng build

The log given by the failure.

** NG Live Development Server is running on http://localhost:4200. **
Hash: 431dce9b2028dcad96e7                                                               
Time: 7586ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 155 kB {4} [initial] [rendered]
chunk    {1} main.bundle.js, main.bundle.js.map (main) 3.72 kB {3} [initial] [rendered]
chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 10.1 kB {4} [initial] [rendered]
chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.76 MB [initial] [rendered]
chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

ERROR in Could not resolve module @angular/core/src/di/opaque_token
webpack: Failed to compile.

Mention any other details that might be useful.

This seems to be a combination of installing packages with Yarn, and using Angular 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions