Skip to content

TypeError: ngtools.PathsPLugin is not a constructor #3358

@Maistho

Description

@Maistho

OS

Linux

Versions

angular-cli: 1.0.0-beta.22
node: 7.2.0
os: linux x64

Repro steps

I was able to reproduce the issue using a completely new project, using 1.0.0-beta.22

ng new testproj
cd testproj
npm test

The log given by the failure

$ ng test
ngtools.PathsPlugin is not a constructor
TypeError: ngtools.PathsPlugin is not a constructor
    at getWebpackTestConfig (/home/maistho/prog/testproj/node_modules/angular-cli/models/webpack-build-test.js:63:9)
    at init (/home/maistho/prog/testproj/node_modules/angular-cli/plugins/karma.js:21:25)
    at Array.invoke (/home/maistho/prog/testproj/node_modules/di/lib/injector.js:75:15)
    at Injector.get (/home/maistho/prog/testproj/node_modules/di/lib/injector.js:48:43)
    at /home/maistho/prog/testproj/node_modules/karma/lib/server.js:143:20
    at Array.forEach (native)
    at Server._start (/home/maistho/prog/testproj/node_modules/karma/lib/server.js:142:21)
    at Injector.invoke (/home/maistho/prog/testproj/node_modules/di/lib/injector.js:75:15)
    at Server.start (/home/maistho/prog/testproj/node_modules/karma/lib/server.js:103:18)
    at /home/maistho/prog/testproj/node_modules/angular-cli/tasks/test.js:33:25
    at Class.run (/home/maistho/prog/testproj/node_modules/angular-cli/tasks/test.js:15:16)
    at Class.run (/home/maistho/prog/testproj/node_modules/angular-cli/commands/test.js:31:25)
    at Class.<anonymous> (/home/maistho/prog/testproj/node_modules/angular-cli/angular-cli/lib/models/command.js:152:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Other details that might be useful

It seems that my @ngtools/webpack is at version 1.1.6, and not 1.1.8, which is the newest version.

cat node_modules/@ngtools/webpack/package.json

Running npm view @ngtools/webpack shows me that 1.1.8 is tagged as 'experimental'. I'm assuming that 1.1.7 or 1.1.8 introduced the PathsPlugin, which seems likely since it was introduced only 9 days ago.

Also, if angular-cli is now depending on the version of @ngtools/webpack to be at least 1.1.8, maybe that should be updated here?

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