Commit bf0d7f8b authored by Tim Neutkens's avatar Tim Neutkens Committed by Arunoda Susiripala

Better error message for missing peerDependencies (#2168)

* Add better error reporting (#2087)

* Apply message to all missing dependencies (#2105)

* Use template string instead of escapes
parent c9a7a35f
......@@ -12,7 +12,7 @@ if (pkg.peerDependencies) {
// When 'npm link' is used it checks the clone location. Not the project.
require.resolve(dependency)
} catch (err) {
console.warn(`${dependency} not found. Please install ${dependency} using 'npm install ${dependency}'`)
console.warn(`The module '${dependency}' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install --save ${dependency}'`)
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment