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

Allowing "file:<path>" --scripts-version values #3629

Merged
merged 2 commits into from
Jan 9, 2018

Conversation

GreenGremlin
Copy link
Contributor

@GreenGremlin GreenGremlin commented Dec 19, 2017

This change is useful for testing local changes to scripts packages before committing them.

e. g.

create-react-app my-app --scripts-version=file:./create-react-app/packages/react-scripts
# or
create-react-app my-app --scripts-version=file:./path/to/custom/scripts-package

I verified these changes by running npm link inside the create-react-app package and then running create-react-app my-app --scripts-version=file:./create-react-app/packages/react-scripts.

@GreenGremlin GreenGremlin changed the title Allowing for local "file:" prefixed scripts packages Allowing for local "file:<path>" --scripts-version options Dec 20, 2017
@GreenGremlin GreenGremlin changed the title Allowing for local "file:<path>" --scripts-version options Allowing "file:<path>" --scripts-version values Dec 20, 2017
@gaearon gaearon added this to the 1.0.18 milestone Jan 9, 2018
@gaearon gaearon merged commit 0d71671 into facebook:master Jan 9, 2018
@gaearon
Copy link
Contributor

gaearon commented Jan 9, 2018

OK. I can't promise we won't break this in the future, but doesn't hurt to get it in.

@GreenGremlin
Copy link
Contributor Author

Understandable, thanks!

@gaearon gaearon mentioned this pull request Jan 15, 2018
@gaearon
Copy link
Contributor

gaearon commented Jan 15, 2018

This is out! Please let us know if something doesn’t quite work.
https://github.com/facebookincubator/create-react-app/releases/tag/v1.1.0

@leepowelldev
Copy link

Trying to get this to work. I've gone into my custom 'react-scripts' directory (after forking this repo and cloning it - nothing edited) and ran npm link and then ran create-react-app myapp --scripts-version=file:/path/to/create-react-app/packages/react-scripts and it all sets up ok. But it fails to compile when started with the following error:

Failed to compile.

./src/index.js
Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions.
    at Array.map (<anonymous>)

Any ideas what I'm missing?

@GreenGremlin
Copy link
Contributor Author

@leepowellcouk instead of npm link, I'd suggest just running npm install, but that shouldn't matter. What version of node/npm are you using?

@gaearon
Copy link
Contributor

gaearon commented Jan 16, 2018

I'd note our local development workflow might be broken right now due to recent changes. If you file a separate issue for that, it would be nice. We had a yarn create-react-app local command for that but it might have also broken. I think I know what needs to be fixed but haven't done so yet.

@GreenGremlin GreenGremlin deleted the file-scripts-package branch January 17, 2018 03:15
@leepowelldev
Copy link

Looked like it was a corrupt react-scripts for me, for some reason a couple of deps had failed. Cleaned it all down, started again and it works great. Thanks for all the hard work that goes into this tooling!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants