git-pre-commit icon indicating copy to clipboard operation
git-pre-commit copied to clipboard

Update require-dir dependency to allow testing on node >= 8

Open mmurphy opened this issue 7 years ago • 0 comments

Running npm run test with node v10.13.0 produces error

mmurphy-OSX:git-pre-commit mmurphy$ node -v
v10.13.0
mmurphy-OSX:git-pre-commit mmurphy$ npm run test

> [email protected] test /Users/mmurphy/src/support/git-pre-commit
> gulp tests --env=development

/Users/mmurphy/src/support/git-pre-commit/node_modules/require-dir/index.js:93
            if (!require.extensions.hasOwnProperty(ext)) {
                                    ^

TypeError: require.extensions.hasOwnProperty is not a function
    at requireDir (/Users/mmurphy/src/support/git-pre-commit/node_modules/require-dir/index.js:93:37)
    at Object.<anonymous> (/Users/mmurphy/src/support/git-pre-commit/node_modules/gulp-git/index.js:4:18)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/mmurphy/src/support/git-pre-commit/gulp/tasks/lint-js.js:9:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `gulp tests --env=development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mmurphy/.npm/_logs/2018-11-01T13_26_08_536Z-debug.log

This may be fixed in require-dir by PR https://github.com/aseemk/requireDir/pull/46

mmurphy avatar Nov 01 '18 13:11 mmurphy