Syntax error when following tutorial
See original GitHub issueWhen following the tutorial, I get a syntax error.
Package.json: { “name”: “next-version”, “version”: “1.0.0”, “description”: “”, “main”: “index.js”, “scripts”: { “dev”: “next” }, “keywords”: [], “author”: “”, “license”: “ISC”, “dependencies”: { “next”: “^6.0.0”, “react”: “^16.3.2”, “react-dom”: “^16.3.2” } }
Console IO: Per-ivinds-MacBook-Pro:next-version poa$ npm run dev
next-version@1.0.0 dev /Users/poa/Documents/dev/smileyhash/next-version next
/Users/poa/Documents/dev/smileyhash/next-version/node_modules/update-check/index.js:18 const getFile = async (details, distTag) => { ^ SyntaxError: Unexpected token ( at Object.exports.runInThisContext (vm.js:78:16) at Module._compile (module.js:543:28) at Object.Module._extensions…js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Server._callee$ (/Users/poa/Documents/dev/smileyhash/next-version/node_modules/next/dist/server/index.js:194:34) at tryCatch (/Users/poa/Documents/dev/smileyhash/next-version/node_modules/regenerator-runtime/runtime.js:62:40) at Generator.invoke [as _invoke] (/Users/poa/Documents/dev/smileyhash/next-version/node_modules/regenerator-runtime/runtime.js:296:22) at Generator.prototype.(anonymous function) [as next] (/Users/poa/Documents/dev/smileyhash/next-version/node_modules/regenerator-runtime/runtime.js:114:21) at step (/Users/poa/Documents/dev/smileyhash/next-version/node_modules/@babel/runtime/helpers/asyncToGenerator.js:12:30) at _next (/Users/poa/Documents/dev/smileyhash/next-version/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:9) at /Users/poa/Documents/dev/smileyhash/next-version/node_modules/@babel/runtime/helpers/asyncToGenerator.js:34:7 at F (/Users/poa/Documents/dev/smileyhash/next-version/node_modules/core-js/library/modules/_export.js:36:28)
npm ERR! Darwin 17.5.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” “dev”
npm ERR! node v7.2.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! next-version@1.0.0 dev: next
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the next-version@1.0.0 dev script ‘next’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the next-version package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! next
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs next-version
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls next-version
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /Users/poa/Documents/dev/smileyhash/next-version/npm-debug.log Per-ivinds-MacBook-Pro:next-version poa$
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
Current Behavior
Steps to Reproduce (for bugs)
Context
Your Environment
Tech | Version |
---|---|
next | |
node | |
OS | |
browser | |
etc |
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top GitHub Comments
Fixed by upgrading node. If you want to prevent this, check the node version if it is possible and prompt user to upgrade.
@MartinReiche I think you are better off opening a new issue requesting support for the version you need pointing to the fact that alot of users probably use Google Cloud Functions. I am not an insider in the project. I read some on Google Cloud Functions when I saw your post and I am thinking that it will probably be upgraded. It is a bit weird that they do not follow latest version of node I think but there is probably a reason for it.