Skip to content

v1.0.0-beta.26: Error in config file, Unable to compile TypeScript #4184

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

Closed
ericis opened this issue Jan 23, 2017 · 4 comments
Closed

v1.0.0-beta.26: Error in config file, Unable to compile TypeScript #4184

ericis opened this issue Jan 23, 2017 · 4 comments

Comments

@ericis
Copy link

ericis commented Jan 23, 2017

OS?

Windows 10

Versions.

angular-cli: 1.0.0-beta.26
node: 6.9.4
os: win32 x64
@angular/common: 2.4.4
@angular/compiler: 2.4.4
@angular/core: 2.4.4
@angular/forms: 2.4.4
@angular/http: 2.4.4
@angular/platform-browser: 2.4.4
@angular/platform-browser-dynamic: 2.4.4
@angular/router: 3.4.4
@angular/compiler-cli: 2.4.4

Repro steps.

  1. git clone https://github.com/angular/angular-cli.git
  2. git checkout tags/v1.0.0-beta.26
  3. npm i
  4. npm link
  5. ng new test-app
  6. cd test-app
  7. ng test

The log given by the failure.

23 01 2017 15:27:41.171:ERROR [config]: Error in config file!
 { TSError: ⨯ Unable to compile TypeScript
..\..\..\..\..\open\github\angular-cli\packages\@ngtools\webpack\src\plugin.ts (46,25): Cannot find name 'Promise'. (2304)
..\..\..\..\..\open\github\angular-cli\packages\@ngtools\webpack\src\plugin.ts (142,43): Property 'assign' does not exist on type 'ObjectConstructor'. (2339)
..\..\..\..\..\open\github\angular-cli\packages\@ngtools\webpack\src\plugin.ts (260,25): Cannot find name 'Promise'. (2304)
    at getOutput (C:\Users\someuser\Documents\src\test-app\node_modules\ts-node\src\index.ts:258:17)
    at C:\Users\someuser\Documents\src\test-app\node_modules\ts-node\src\index.ts:267:16
    at Object.compile (C:\Users\someuser\Documents\src\test-app\node_modules\ts-node\src\index.ts:403:17)
    at loader (C:\Users\someuser\Documents\src\test-app\node_modules\ts-node\src\index.ts:289:33)
    at Object.require.extensions.(anonymous function) [as .ts] (C:\Users\someuser\Documents\src\test-app\node_modules\ts-node\src\index.ts:306:14)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Function.Module._load (C:\Users\someuser\Documents\src\open\github\angular-cli\lib\bootstrap-local.js:69:24)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\someuser\Documents\src\open\github\angular-cli\packages\@ngtools\webpack\src\index.ts:3:1)
    at Module._compile (module.js:570:32)
    at loader (C:\Users\someuser\Documents\src\test-app\node_modules\ts-node\src\index.ts:289:14)
    at Object.require.extensions.(anonymous function) [as .ts] (C:\Users\someuser\Documents\src\test-app\node_modules\ts-node\src\index.ts:306:14)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Function.Module._load (C:\Users\someuser\Documents\src\open\github\angular-cli\lib\bootstrap-local.js:56:22)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\someuser\Documents\src\open\github\angular-cli\packages\angular-cli\models\webpack-build-test.js:5:17)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Function.Module._load (C:\Users\someuser\Documents\src\open\github\angular-cli\lib\bootstrap-local.js:69:24)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\someuser\Documents\src\open\github\angular-cli\packages\angular-cli\plugins\karma.js:4:69)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Function.Module._load (C:\Users\someuser\Documents\src\open\github\angular-cli\lib\bootstrap-local.js:62:22)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at module.exports (C:\Users\someuser\Documents\src\test-app\karma.conf.js:12:7)
    at Object.parseConfig (C:\Users\someuser\Documents\src\test-app\node_modules\karma\lib\config.js:342:5)
    at new Server (C:\Users\someuser\Documents\src\test-app\node_modules\karma\lib\server.js:56:20)
    at C:\Users\someuser\Documents\src\test-app\node_modules\angular-cli\tasks\test.js:32:31
    at Class.run (C:\Users\someuser\Documents\src\test-app\node_modules\angular-cli\tasks\test.js:15:16)
    at Class.run (C:\Users\someuser\Documents\src\test-app\node_modules\angular-cli\commands\test.js:30:25)
    at Class.<anonymous> (C:\Users\someuser\Documents\src\test-app\node_modules\angular-cli\ember-cli\lib\models\command.js:147:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)
  diagnostics:
   [ '..\\..\\..\\..\\..\\open\\github\\angular-cli\\packages\\@ngtools\\webpack\\src\\plugin.ts (46,25): Cannot find name \'Promise\'. (2304)',
     '..\\..\\..\\..\\..\\open\\github\\angular-cli\\packages\\@ngtools\\webpack\\src\\plugin.ts (142,43): Property \'assign\' does not exist on type \'ObjectConstructor\'. (2339)',
     '..\\..\\..\\..\\..\\open\\github\\angular-cli\\packages\\@ngtools\\webpack\\src\\plugin.ts (260,25): Cannot find name \'Promise\'. (2304)' ] }

Mention any other details that might be useful.

Appears to be rxjs related.

@hansl
Copy link
Contributor

hansl commented Jan 23, 2017

You're not using your local linked version of the CLI. Try to go inside your project and npm link angular-cli.

@ericis
Copy link
Author

ericis commented Jan 23, 2017

Okay, thanks @hansl. I tried a few things based on the above, but got the same error until I reinstalled the local NPM package for the CLI.

Short story: npm uninstall angular-cli and npm install angular-cli (local package.json points to 1.0.0-beta.26)

Long story

  1. npm link angular-cli

  2. ng test
    (same error)

  3. Update CLI version inside package.json to match local

  4. ng test
    (same error)

  5. Unlink the local install of CLI from github and confirm it's gone with ng test (yep, gone)

  6. Back to project and run ng test
    (same error)

  7. Try npm run test for fun
    (same error)

  8. Checkout v1.0.0-beta.25

  9. Remove node_modules from local CLI clone

  10. npm i (CLI)

  11. npm link

  12. ng new test-app --style=scss

  13. ng test
    (same error)

Then...

npm uninstall angular-cli and npm install angular-cli (local package.json points to 1.0.0-beta.26)

Works! I removed my local clone of the CLI entirely just to avoid the confusion of when one is running vs. another.

@ericis ericis closed this as completed Jan 23, 2017
@filipesilva
Copy link
Contributor

Dupe of #4177

@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 Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants