Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cannot setup next.js #4578

Closed
hitt5 opened this issue Jun 10, 2018 · 3 comments
Closed

I cannot setup next.js #4578

hitt5 opened this issue Jun 10, 2018 · 3 comments

Comments

@hitt5
Copy link

hitt5 commented Jun 10, 2018

#I did following tutorial. Then command 'npm run dev', error is occurred.
https://github.com/zeit/next.js

Describe the bug

ERROR Failed to compile with 1 errors

error in ./pages?entry

Syntax Error: Unexpected token (6:21)

4 | // };
5 |

6 | export default () =>

Welcome to next.js!

| ^
7 |
@ multi ./pages?entry

Screenshots

2018-06-11 2 02 46

2018-06-11 2 03 22

2018-06-11 2 03 41

System information

  • OS: macOS
  • Browser (if applies) chrome
  • Version of Next.js: 4.2.3

Additional context

------index.js-----------

export default () =>
Welcome to next.js!

------package.json------
{
"name": "kickstart",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "mocha",
"dev": "next",
"build": "next build",
"start": "next start"
},
"author": "",
"license": "ISC",
"dependencies": {
"fs-extra": "^6.0.1",
"ganache-cli": "^6.1.0",
"mocha": "^5.2.0",
"next": "^4.2.3",
"react": "^16.4.0",
"react-dom": "^16.4.0",
"solc": "^0.4.24",
"truffle-hdwallet-provider": "0.0.3",
"web3": "^1.0.0-beta.26"
}
}

@timneutkens
Copy link
Member

Looks like you're on a very old version of Next.js, 4.2.3, we're currently at Next.js 6. Let's start by upgrading. But I'm pretty sure that's not the issue.

What I suspect is that you have a .babelrc somewhere in the upwards directory tree. Like in your home directory for example. Next will show a message similar to "using custom .babelrc: <path>".

@hitt5
Copy link
Author

hitt5 commented Jun 10, 2018

@timneutkens Thank you very much for your quick response.
I upgrade Next.js and delete my .babelrc file, it works!!
Really appreciate it.

@hitt5 hitt5 closed this as completed Jun 10, 2018
@timneutkens
Copy link
Member

Great 🙌 The only time I saw this happen is with a .babelrc file somewhere 👍

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants