-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
Conversation
bin/next
Outdated
} | ||
}) | ||
|
||
if (peerDependencyUnavailable) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed re: not exiting
There was a problem hiding this comment.
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}'`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.error
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or warn
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@arunoda merged it in. |
Fixes #1180