question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Syntax error when following tutorial

See original GitHub issue

When 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:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
pan100commented, May 3, 2018

Fixed by upgrading node. If you want to prevent this, check the node version if it is possible and prompt user to upgrade.

0reactions
pan100commented, May 5, 2018

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid Syntax in Python: Common Reasons for SyntaxError
In this step-by-step tutorial, you'll see common examples of invalid syntax in Python and learn how to resolve the issue. If you've ever...
Read more >
Syntax Errors in Coding and What You Can Do to Fix Them
A syntax error commonly occurs in coding when the coder has typed in something incorrectly. Syntax errors are easy to find and fix....
Read more >
Syntax Error When Following Pygame/Python Tutorial on ...
I updated your code: import pygame from pygame.locals import * #about: pygame boilerplate class GameMain(): # handles intialization of game ...
Read more >
What is a Syntax Error in Python? (Examples + How to solve it)
In this lesson we will be covering one of the most basic errors you will probably get in Python; the Syntax Error. A...
Read more >
How to Fix "Parse Error: Syntax Error, Unexpected" on ...
A syntax error occurs when there's a mistake in your code. As a result, the compiler cannot process (parse) the file and fail...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found