Gatsby Starter Blog not working on Ubunto

Hi I did the gatsby starter blog before on other OS successfully, but on my new machine, now it is giving below errors when I run “npm run dev”:
“Make sure you have the latest version of node.js and npm installed.” Kindly help me to fix this error. i appreciate you all, thanks

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘run’, ‘dev’ ]
2 info using npm@3.5.2
3 info using node@v8.10.0
4 verbose run-script [ ‘predev’, ‘dev’, ‘postdev’ ]
5 info lifecycle contentful-starter-gatsby-blog@0.0.1~predev: contentful-starter-gatsby-blog@0.0.1
6 silly lifecycle contentful-starter-gatsby-blog@0.0.1~predev: no script for predev, continuing
7 info lifecycle contentful-starter-gatsby-blog@0.0.1~dev: contentful-starter-gatsby-blog@0.0.1
8 verbose lifecycle contentful-starter-gatsby-blog@0.0.1~dev: unsafe-perm in lifecycle true
9 verbose lifecycle contentful-starter-gatsby-blog@0.0.1~dev: PATH: /usr/share/npm/bin/node-gyp-bin:/home/ubuntu/contentful-ga
tsby-blog/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle contentful-starter-gatsby-blog@0.0.1~dev: CWD: /home/ubuntu/contentful-gatsby-blog
11 silly lifecycle contentful-starter-gatsby-blog@0.0.1~dev: Args: [ ‘-c’, ‘gatsby develop’ ]
12 info lifecycle contentful-starter-gatsby-blog@0.0.1~dev: Failed to exec dev script
13 verbose stack Error: contentful-starter-gatsby-blog@0.0.1 dev: gatsby develop
13 verbose stack spawn ENOENT
13 verbose stack at ChildProcess. (/usr/share/npm/lib/utils/spawn.js:17:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid contentful-starter-gatsby-blog@0.0.1
15 verbose cwd /home/ubuntu/contentful-gatsby-blog
16 error Linux 4.15.0-1021-aws
17 error argv “/usr/bin/node” “/usr/bin/npm” “run” “dev”
18 error node v8.10.0
19 error npm v3.5.2
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error contentful-starter-gatsby-blog@0.0.1 dev: gatsby develop
24 error spawn ENOENT
25 error Failed at the contentful-starter-gatsby-blog@0.0.1 dev script ‘gatsby develop’.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the contentful-starter-gatsby-blog package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error gatsby develop
25 error You can get information on how to open an issue for this project with:
25 error npm bugs contentful-starter-gatsby-blog
25 error Or if that isn’t available, you can get their info via:
25 error npm owner ls contentful-starter-gatsby-blog
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]