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

Add message for missing peerDependencies #1187

Merged
merged 5 commits into from
Feb 23, 2017
Merged

Conversation

timneutkens
Copy link
Member

Fixes #1180

bin/next Outdated
}
})

if (peerDependencyUnavailable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eventually a dumb question, but do we actually need react in every case? what if we're using preact or inferno? <- never used them, but saw it in the example folder... do we still need react installed?

If we don't strictly require them we shouldn't kill the application here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sakulstra I believe we do since react is still used server side. cc @arunoda

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sakulstra the idea behind is to make that usecase even better precisely, by not being opinionated about what flavor of React (fiber vs non-fiber) we bundle, or even enabling alt-Reacts.

At the moment, however, we need to figure out how we do an alias for the Node side of things, so that we use the server-renderer of each package.

We might introduce alias in next.config.js for this purpose (see #767), but I wish we could avoid it. Maybe we need to figure out a better way to run webpack on the server code. cc @nkzawa @arunoda

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sakulstra has a good point.
We still don't use preact in the server that's where we need it most.

Anyway, @timneutkens we shouldn't kill the process. Just warn them is what we needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed re: not exiting

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, removing.

bin/next Outdated
// When 'npm link' is used it checks the clone location. Not the project.
require.resolve(dependency)
} catch (err) {
console.log(`${dependency} not found. Please install ${dependency} using 'npm install ${dependency}'`)
Copy link
Member

@rauchg rauchg Feb 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.error ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or warn 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one 🙌

Copy link
Contributor

@arunoda arunoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@timneutkens
Copy link
Member Author

@arunoda merged it in.

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

Successfully merging this pull request may close these issues.

None yet

6 participants