I am trying to create a solution which will deploy the assets to SP online by following tutorial. Since this is based on version 1.4.0 i have udpated @microsoft-* packages to 1.4.0 But I am getting following error. I am not understanding how to make this packages sync.

Cannot find type definition file for 'es6-collections'.

This looks like a known issue while upgrading from SPFx 1.3 to 1.4

To fix it, just install the typed definitions of es6-collections as below:

npm install --save @types/es6-collections
  • This is great. One quick question, how I can check the version of typescript installed in my machine?
    – Mihir
    Jan 10 '18 at 16:39
  • Not really 100% sure, but if i open VS Code, its displayed at the bottom bar like this.. If it helped resolve your isse, can you please mark it answer :) Jan 10 '18 at 16:45
  • Seems image is wrong. I am asking similar command as npm --version
    – Mihir
    Jan 10 '18 at 16:47
  • 1
    Currently spfx 1.4 uses Typescript 2.4.2 Jan 10 '18 at 16:48
  • If typescript is installed globally, you can try npm -list -g --depth=0 Jan 10 '18 at 16:55

Please update your tsconfig.json (in the root of the project). The latest yeoman generator creates it like this:

  "compilerOptions": {
    "target": "es5",
    "forceConsistentCasingInFileNames": true,
    "module": "commonjs",
    "jsx": "react",
    "declaration": true,
    "sourceMap": true,
    "experimentalDecorators": true,
    "skipLibCheck": true,
    "typeRoots": [
    "types": [
    "lib": [
  • 2
    what should we update tsconfig.json to ? What changes do we need to make ? Jan 12 '18 at 13:55
  • you should add es6 to lib section at the top
    – kesava
    Sep 1 '20 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.