1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

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
This commit is contained in:
Tim Neutkens 2017-06-07 11:13:49 +02:00 committed by Arunoda Susiripala
parent c9a7a35f78
commit bf0d7f8b40

View file

@ -12,7 +12,7 @@ if (pkg.peerDependencies) {
// When 'npm link' is used it checks the clone location. Not the project. // When 'npm link' is used it checks the clone location. Not the project.
require.resolve(dependency) require.resolve(dependency)
} catch (err) { } 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}'`)
} }
}) })
} }