What can be the issue.
Make sure that you have the latest version of NodeJS. You can check the latest version using
Follow the full procedure here: SharePoint Framework - Set up your SharePoint client-side web part development environment
SPFx build pipeline does NOT currently support npm v5.x, so you'll need to use either v3 or v4. At the time of the writing, NodeJS LTS version (v6.11.0) installs npm v3.10.10.
You can downgrade to older npm version with following command
npm install -g npm@3.
You can check below SPFx article for complete details