Parcel: Getting Started guide doesn't work.

Created on 11 Dec 2017  路  5Comments  路  Source: parcel-bundler/parcel

馃悰 bug report
Just following the Getting STarted page and am unable to get it to work.

馃帥 Configuration (.babelrc, package.json, cli command)

mkdir react-parcel-test2
cd react-parcel-test2/
yarn init -y
yarn add --dev parcel-bundler

echo '
<html>
<body>
  <script src="./index.js"></script>
</body>
</html>
' > index.html

echo '
console.log("hello world");
' > index.js

perl -i.bak -pne 's{("devDependencies")}{"scripts": {\n    "start": "parcel index.html"\n  },\n  $1}xmsg' package.json
yarn start
browser http://localhost:1234

馃 Expected Behavior

I expected it to produce a console log in the browser

馃槸 Current Behavior

react-parcel-test2.js:11 Uncaught ReferenceError: require is not defined

馃拋 Possible Solution

馃敠 Context

unable to even try out the code

馃實 Your Environment

node --version
v6.11.4

yarn --version
1.3.2

Attached the files.

get-started.zip

Most helpful comment

I just tried it with node v8+ and it's ok. Might be good to put a minimum node version on the Getting Started Page.

All 5 comments

I just tried it with node v8+ and it's ok. Might be good to put a minimum node version on the Getting Started Page.

@bcowgill Hi Brent :)
I'll follow this issue and add the v8+ info on the website.

engines in package.json current lists >= 6.0.0

We should update this as well if only 8+ is supported.

However, I suspect we want to support 6.0.0. Babel is run on the src for consumers for this reason. We should look into fixing the issue and continuing to support 6+.

Thanks for reporting this 馃榾

I'm currently trying to organize all of our open issues. Since this issue seems to be a duplicate of #40 , I'm gonna go ahead and close this issue.

If you think I've done so in error, please don't hesitate to re-open the issue, comment, or send me a message on slack.

Was this page helpful?
0 / 5 - 0 ratings