cubevizjs
cubevizjs copied to clipboard
TypeError: require.extensions.hasOwnProperty is not a function
I just tried this project by following the instructions to npm install and npm start but got an error:
npm start
> [email protected] start /home/src/cubevizjs
> gulp
/home/src/cubevizjs/node_modules/require-dir/index.js:93
if (!require.extensions.hasOwnProperty(ext)) {
^
TypeError: require.extensions.hasOwnProperty is not a function
at requireDir (/home/src/cubevizjs/node_modules/require-dir/index.js:93:37)
at Object.<anonymous> (/home/src/cubevizjs/node_modules/gulp-git/index.js:4:18)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/src/cubevizjs/gulpfile.js:3:11)
npm ERR! Linux 5.3.0-42-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `gulp`
npm ERR! Exit status 1
I found this https://robertwray.co.uk/blog/gulp-node-js-and-require-extensions-hasownproperty-is-not-a-function
which describes changing
if (!require.extensions.hasOwnProperty(ext)) {
to
if (!Object.prototype.hasOwnProperty.call(require.extensions, ext)) {
That seemed to work
Hi @howff, thank you for the report.
@GeorgesAlkhouri: What do you think?
Sorry, currently I have no time to look into this.