coursefiles / angular2-essential-training

The repository for the project code for my course Angular Essential Training
https://www.linkedin.com/learning/angular-2-essential-training-2
MIT License
197 stars 1.06k forks source link

Property 'find' does not exist on type 'number error on nmp start. #8

Closed msooraj closed 7 years ago

msooraj commented 7 years ago

Getting "Property 'find' does not exist on type 'number" error on npm start.

Please set the compiler target to es6 in your tsconfig.

jschwarty commented 7 years ago

Looks like it's an issue with a newer version of @types/core-js. The package.json file is currently set up to use the ^ on that package and the @types/node package which results in you getting the latest version of those. I am going to update the code in the repo to fix that, but for the meantime you can update your local package file like so (removing the ^ from in front of the version number for these two):

"devDependencies": {
    "@types/core-js": "0.9.34",
    "@types/node": "6.0.41",
    ...
  }

Then you need to delete your node_modules directory and run npm install again.

jschwarty commented 7 years ago

Okay, all the branches have been updated to remove the caret on the @types packages and fix this issue. Thanks @msooraj for letting me know about this issue! I appreciate you reporting it.

msooraj commented 7 years ago

Thanks for fixing. Just started the course in Linda. It is very helpful.

WARPed1701D commented 7 years ago

Hi. I just cloned the course files and while in the MASTER branch I ran npm install and npm start. I received the same error on running npm start as originally reported. Removing the ^ from packages.json as described above resolved the issue. Looking at the packages file in the master branch on GitHub shows no ^. Yet I cloned the repo again and sure enough in the packages.json file the ^ was there for both core-js and node.

caret

caret

jschwarty commented 7 years ago

@WARPed1701D Interesting...I will take a look and see if I can identify how that happens. Thanks for the detailed reporting of this!