Skip to content

ng test fails, is unable to compile TypeScript #4568

@catull

Description

@catull

OS?

macOS Sierra (10.12.3)

Versions.

@angular/cli: 1.0.0-beta.30
node: 7.5.0
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7

Repro steps.

ng new cool-app
cd cool-app
ng test

The log given by the failure.

➜ cool-app git:(master) ng test
09 02 2017 19:33:49.134:ERROR [config]: Error in config file!
{ TSError: ⨯ Unable to compile TypeScript
../../../workspace/js/ng/angular-cli.git/packages/@ngtools/webpack/src/plugin.ts (48,25): Cannot find name 'Promise'. (2304)
../../../workspace/js/ng/angular-cli.git/packages/@ngtools/webpack/src/plugin.ts (148,43): Property 'assign' does not exist on type 'ObjectConstructor'. (2339)
../../../workspace/js/ng/angular-cli.git/packages/@ngtools/webpack/src/plugin.ts (349,25): Cannot find name 'Promise'. (2304)
at getOutput (/private/tmp/cool-app/node_modules/ts-node/src/index.ts:258:17)
at /private/tmp/cool-app/node_modules/ts-node/src/index.ts:267:16
at Object.compile (/private/tmp/cool-app/node_modules/ts-node/src/index.ts:403:17)
at loader (/private/tmp/cool-app/node_modules/ts-node/src/index.ts:289:33)
at Object.require.extensions.(anonymous function) [as .ts] (/private/tmp/cool-app/node_modules/ts-node/src/index.ts:306:14)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Function.Module._load (workspace/js/ng/angular-cli.git/lib/bootstrap-local.js:69:24)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (workspace/js/ng/angular-cli.git/packages/@ngtools/webpack/src/index.ts:1:1)
at Module._compile (module.js:571:32)
at loader (/private/tmp/cool-app/node_modules/ts-node/src/index.ts:289:14)
at Object.require.extensions.(anonymous function) [as .ts] (/private/tmp/cool-app/node_modules/ts-node/src/index.ts:306:14)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Function.Module._load (workspace/js/ng/angular-cli.git/lib/bootstrap-local.js:56:22)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (workspace/js/ng/angular-cli.git/packages/@angular/cli/models/webpack-configs/test.js:5:17)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Function.Module._load (workspace/js/ng/angular-cli.git/lib/bootstrap-local.js:69:24)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (workspace/js/ng/angular-cli.git/packages/@angular/cli/plugins/karma.js:4:23)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Function.Module._load (workspace/js/ng/angular-cli.git/lib/bootstrap-local.js:62:22)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at module.exports (/private/tmp/cool-app/karma.conf.js:12:7)
at Object.parseConfig (/private/tmp/cool-app/node_modules/karma/lib/config.js:342:5)
at new Server (/private/tmp/cool-app/node_modules/karma/lib/server.js:56:20)
at /private/tmp/cool-app/node_modules/@angular/cli/tasks/test.js:26:31
at Class.run (/private/tmp/cool-app/node_modules/@angular/cli/tasks/test.js:10:16)
at Class.run (/private/tmp/cool-app/node_modules/@angular/cli/commands/test.js:29:25)
at Class. (/private/tmp/cool-app/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)
at process._tickCallback (internal/process/next_tick.js:103:7)
diagnostics:
[ '../../../workspace/js/ng/angular-cli.git/packages/@ngtools/webpack/src/plugin.ts (48,25): Cannot find name 'Promise'. (2304)',
'../../../workspace/js/ng/angular-cli.git/packages/@ngtools/webpack/src/plugin.ts (148,43): Property 'assign' does not exist on type 'ObjectConstructor'. (2339)',
'../../../workspace/js/ng/angular-cli.git/packages/@ngtools/webpack/src/plugin.ts (349,25): Cannot find name 'Promise'. (2304)' ] }

Mention any other details that might be useful.

Project is located at /tmp/cool-app
Angular CLI is from master, npm link'd

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions