question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find name 'Iterable' while using angular 4.

See original GitHub issue
> npm run tsc

node_modules/@angular/core/src/change_detection/differs/iterable_differs.d.ts(15,48): error TS2304: Cannot find name 'Iterable'.

npm ERR! Darwin 16.4.0
npm ERR! argv "/Users/username/.nvm/versions/node/v7.7.3/bin/node" "/Users/username/.nvm/versions/node/v7.7.3/bin/npm" "install"
npm ERR! node v7.7.3
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! myservice-api@0.1.0 prepublish: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the myservice-api@0.1.0 prepublish script 'tsc'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the myservice-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugsmyservice-api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls myservice-api
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/username/work-place/myservice-api/npm-debug.log

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
m1klcommented, Mar 28, 2017

I got the same problem here.

Steps to reproduce:

  1. Created a new angular 2 library with the version 6.0.0 of the generator
  2. Updated package.json with Angular 4 dependencies
  3. Deleted node_modules
  4. Run npm install

The error

ng2-rest-base-client $ npm install

> rest-base-client@0.1.0 prepublish D:\Projects\IPLeiria\candidaturas\ng2-rest-base-client
> tsc

node_modules/@angular/core/src/change_detection/differs/iterable_differs.d.ts(15,48): error TS2304: Cannot find name 'Iterable'.

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Users\\mickael\\scoop\\apps\\nvm\\current\\nodejs\\node.exe" "C:\\Users\\mickael\\scoop\\apps\\nvm\\current\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! rest-base-client@0.1.0 prepublish: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the rest-base-client@0.1.0 prepublish script 'tsc'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the rest-base-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs rest-base-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls rest-base-client
npm ERR! There is likely additional logging output above.

package.json

...
  "dependencies": {
  },
  "devDependencies": {
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/compiler-cli": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/animations": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-server": "^4.0.0",
    "codelyzer": "~2.0.0",
    "rxjs": "^5.1.0",
    "tslint": "^4.5.0",
    "typescript": "~2.2.2",
    "zone.js": "^0.8.4",
    "@types/es6-shim": "^0.31.32",
    "@types/jasmine": "^2.5.40",
    "@types/selenium-webdriver": "^2.53.39"
  },
  "engines": {
    "node": ">=0.8.0"
  }
...
0reactions
jvandemocommented, Mar 29, 2017

@mickael83 — Awesome, thank you for the confirmation! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build:Cannot find name 'Iterable' after upgrading to Angular ...
'Iterable' is defined in the typings file for node. Installing file that solved the problem for me (node_modules/@types/node/index.d.ts).
Read more >
Cannot find name 'Iterable'. · Issue #14595 · angular ...
I recently upgraded my angular 2 project to 4.0.0-beta.8. But when I try to compile, it throws below error: node_modules/@angular/core/src/ ...
Read more >
error TS2304 Cannot find name 'IterableIterator' - YouTube
error TS2304 Cannot find name ' IterableIterator ' - Typescript error when converting ts to js. 2.2K views 2 years ago.
Read more >
Build:Cannot find name 'Iterable' after upgrading to Angular ...
This is my solved configuration. It really helps to use npm install to upgrade from angular 2 to 5, rather than trying to...
Read more >
Error TS2304: Cannot find name 'Iterable' - Questions
I installed TypeScript 2.3.2. I receive this message after gulp command: TypeScript error: node_modules/@types/three/three-core.d.ts(767,24): ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found