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

Issue within React Create App #485

Closed
Darren-Ivey opened this issue Jan 8, 2017 · 12 comments
Closed

Issue within React Create App #485

Darren-Ivey opened this issue Jan 8, 2017 · 12 comments
Assignees
Labels
Status: Pinned A way to keep old or long lived issues around

Comments

@Darren-Ivey
Copy link

I have added this package to a React Create App, but get the following error (as well as a several warning):

"Uncaught TypeError: Invalid Version: semver.js:293 "

I updated both my npm and node, but the issue persisted. Is this a common issue and is there a solution?

Thanks in advance.

@kaizensoze
Copy link

@Darren-Ivey
Copy link
Author

Thanks for a fast response. Unfortunately I am not using Gulp.

@kaizensoze
Copy link

Do you have a sample project I can take a look at to reproduce the issue?

@Darren-Ivey
Copy link
Author

I have put a bare bones crate react app with the github demo in the App.js here: https://github.com/Darren-Ivey/React-GitHubApi-Test

@kaizensoze
Copy link

My best guess is an incompatibility with webpack. Unfortunately there isn't currently a fix.

@Darren-Ivey
Copy link
Author

Ok, fair enough. Thank you for looking into the issue, it's much appreciated.

@gr2m
Copy link
Contributor

gr2m commented Dec 26, 2017

@Darren-Ivey I made a few changes recently that should help with browserify compatibility. Could you give it another try by chance?

Also the next milestone is browser compatibility, if you are interested in progress I recommend to subscribe to this issue: #620

@gr2m gr2m added this to the v14.0.0 - Browser compatibility milestone Dec 26, 2017
@gr2m gr2m self-assigned this Dec 26, 2017
@stale
Copy link

stale bot commented Jan 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 23, 2018
@gr2m gr2m added Status: Pinned A way to keep old or long lived issues around and removed stale labels Jan 23, 2018
@gr2m
Copy link
Contributor

gr2m commented Feb 2, 2018

It should work with latest @octokit/rest, please let me know if it doesn’t.

I working towards further browser improvements, like test setups and reduced bundle size. See https://github.com/octokit/rest.js/issues/620#issuecomment-362715478

@gr2m gr2m closed this as completed Feb 2, 2018
@rsullivan00
Copy link

@gr2m Looks like the Octokit npm package isn't compiled to ES5, which create-react-app expects for dependencies.

yarn run v1.5.1
$ yarn run build
$ NODE_PATH=./src react-app-rewired build
Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

 	./node_modules/@octokit/rest/lib/plugins/pagination/get-page-links.js:10:26

Read more here: http://bit.ly/2tRViJ9

error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c NODE_PATH=./src react-app-rewired build

@gr2m
Copy link
Contributor

gr2m commented Mar 29, 2018

Could you please create a follow up issue on that? I try to avoid a build step right now, but plan to use the ES Modules syntax in future for better tree shaking / smaller bundle size, so that should fix it for good. But before that it would be great if you could have a look what syntax is breaking right now, if it's not too much we can just make the change directly

@rsullivan00
Copy link

Looks like that line uses an arrow function--I doubt it's worthwhile to manually convert ES6 syntax to ES5. I can work around this by forking and building to ES5 in the short term.

link.replace(/<([^>]*)>;\s*rel="([\w]*)"/g, (m, uri, type) => {

I'll create a separate issue to track the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pinned A way to keep old or long lived issues around
Projects
None yet
Development

No branches or pull requests

4 participants