parcel: Can't find variable: require

πŸ› bug report

I’ve followed the Getting Started section on the website exactly, but when I run parcel index.html and open the URL in my browser, I get an error in my console saying ReferenceError: Can't find variable: require.

πŸŽ› Configuration (.babelrc, package.json, cli command)

{
  "name": "something",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT"
}

πŸ”¦ Context

I’m really just trying to set up a basic project with parcel

🌍 Your Environment

Software Version(s)
Node 8.9.2
npm/Yarn yarn 1.3.2
Operating System macOS 10.13.2 Beta

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (10 by maintainers)

Most upvoted comments

@lifeart hmmm that’s pretty strange 😟

Do you mind moving that screenshot to #40? Also, do you mind giving a bit more context, like you’re node version, and exactly what you where trying to do.

This seems to be a pretty big issue, so I’m gonna try to dive into it and identify the cause and fix it. But it seems pretty mysterious so far. I’m trying to gather as much info about the context, so please give me as much info as you can πŸ˜ƒ

From what I see, upgrading node seems to fix the issue. So if you want a quick fix, go ahead and do that.