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

issues while creating custom react-scripts #1124

Closed
shrynx opened this issue Dec 1, 2016 · 8 comments
Closed

issues while creating custom react-scripts #1124

shrynx opened this issue Dec 1, 2016 · 8 comments

Comments

@shrynx
Copy link
Contributor

shrynx commented Dec 1, 2016

Description

I am making a custom react-scripts, and i used the latest master branch to clone and modify it. but while running i get into error Cannot find module 'react-dev-utils/getProcessForPort'

Expected behavior

The master branch of create react app has the getProcessForPort.js, but the one downloaded from npm doesn't have it. (probably not part of the release ?)

Reproducible Demo

to reproduce this i have published the broken package on npm
create-react-app myApp --scripts-version super-react-scripts

@gaearon
Copy link
Contributor

gaearon commented Dec 1, 2016

Yes, you'd either need to wait for the next react-dev-utils release, rollback your fork to before it was changed, or fork it too.

@gaearon
Copy link
Contributor

gaearon commented Dec 1, 2016

I’ll close because this is not very actionable for us. This particular issue will be solved with next release, but in general it might be better to fork from the latest stable version rather than from master.

@gaearon gaearon closed this as completed Dec 1, 2016
@kitze
Copy link

kitze commented Dec 1, 2016

@shrynx In my fork I just copied the file that was missing.

Of course, this is temporary until the new version of react-dev-utils is published.

@shrynx
Copy link
Contributor Author

shrynx commented Dec 2, 2016

@kitze Oh alright, i just commented out the code. Although, I will be copying a few things from your fork :)

@kitze
Copy link

kitze commented Dec 2, 2016

@shrynx one advice, if you want to keep up with the original repo easily, don't modify too many things otherwise you'll have a headache. I'm modifying only ~10 lines and it's still hard 😅

@shrynx
Copy link
Contributor Author

shrynx commented Dec 3, 2016

@kitze Thanks for the advice. I currently have modified code to a decent extent, but i saw your repo. Will try to approach similar way.

@gaearon @kitze
PS: If you have some free time, please check react-super-scripts
https://www.npmjs.com/package/react-super-scripts

@kitze
Copy link

kitze commented Dec 3, 2016

@shrynx cool 👍

Btw this already exists in the original CRA, you can achieve it by adding PORT=3000 into .env

@shrynx
Copy link
Contributor Author

shrynx commented Dec 3, 2016

@kitze Oh yeah, totally makes sense. I even documented regarding environment variable. must have slipped off from my mind. Thanks for the heads up.

@lock lock bot locked and limited conversation to collaborators Jan 22, 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

3 participants