Today I will talk about an error that may occur when you try to follow the SharePoint Framework tutorial to create the HelloWorld webpart: https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/build-a-hello-world-web-part
When you follow the tutorial, using the “gulp serve” command generates the following errors
Error - typescript - node_modules\@types\lodash\index.d.ts(8446,32): error TS1005: ',' expected. Error - typescript - node_modules\@types\es6-collections\index.d.ts(78,29): error TS2304: Cannot find name 'object'.
The SharePoint Framework evolved very quickly in a very short time. You may have a template version that is not up to date.
To resolve these errors, simply get the last version of the template with the following command
npm install -g @microsoft/generator-sharepoint@latest
If it is not enough, install the correct versions of lodash and es6-collection via the following commands
npm install @email@example.com npm install @firstname.lastname@example.org
Hoping this helps