Version: 1.0.4-alpha.01.0.41.1.0-alpha.11.1.01.2.0-alpha.11.2.0-alpha.21.2.01.10.1-alpha.11.10.1-alpha.21.10.1-alpha.31.10.1-alpha.51.10.1-alpha.61.10.1-alpha.71.11.01.11.11.11.21.11.3-alpha.01.11.31.11.4-alpha.01.11.41.12.0-alpha.01.12.0-alpha.11.12.01.12.11.12.21.12.41.13.0-alpha.01.13.01.13.11.13.21.13.31.13.41.14.0-alpha.01.14.0-alpha.11.14.01.14.11.14.2-alpha.01.14.21.14.3-alpha.01.14.31.15.0-alpha.01.15.01.15.11.15.21.15.31.15.4-alpha.01.15.41.16.01.16.11.16.21.16.3-alpha.01.16.31.17.01.17.1-alpha.01.17.11.18.0-alpha.11.18.01.18.1-alpha.01.18.11.19.01.20.0-alpha.01.20.01.20.1-alpha.01.20.11.20.2-alpha.01.20.2-alpha.11.20.21.20.3-alpha.01.20.31.20.4-alpha.01.20.41.20.51.20.61.20.71.21.1-alpha.01.21.12.0.0-preview.0
/* eslint import/no-commonjs:0 no-useless-escape:0*/
const path = require('path')
const findNodeModules = (start) => {
const inner = (p) => {
if (path.dirname(p) === p) {
// root
throw new Error('Cannot find node modules directory')
} else {
return path.basename(p) === 'node_modules' ? p : inner(path.dirname(p))
}
return inner(start)
module.exports = {findNodeModules}