You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
Getting this on on package.json now, including dependency-check/package.json.
Object.keys(deps).forEach(function (dep) {
^
TypeError: Object.keys called on non-object
at Function.keys (native)
at c:\Users\Jonathon J. Howey\AppData\Roaming\npm\node_modules\dependency-ch
eck\index.js:101:14
at Array.forEach (native)
at c:\Users\Jonathon J. Howey\AppData\Roaming\npm\node_modules\dependency-ch
eck\index.js:100:13
The text was updated successfully, but these errors were encountered:
jonovate
changed the title
"Object.keys called on non-object" error node -v 0.12.4
"Object.keys called on non-object" error node -v 0.12.4 win32
Jun 15, 2015
So the call to getDeps() is callingback with NULL immediately because file is being passed in as an absolute path: "c:\Users\Jonathon J. Howey\AppData\Roaming\npm\node_modules\dependency-ch eck\index.js"
This appears to be on purpose though because of path.join on lines 65 and 70 is resulting in paths[] array entries being absolute.
IS_NOT_RELATIVE.test(file) <== returns true.
So the easy workaround is comment it out locally, but I still don't understand the IS_NOT_RELATIVE vs lines 65 and 70. They seem to be conflicting.???
From the description of the issues it sounds like it would be possible to solve this by replacing the regexp with a module that supports checking Windows paths as well – like: https://github.com/jonschlinkert/is-relative The current one wont detect Windows paths properly.
Would have trouble testing it though as I don't have good access to a Windows machine.
@jonovate If you could try and replace it and test it and make a PR then that would be helpful.
Getting this on on package.json now, including dependency-check/package.json.
Object.keys(deps).forEach(function (dep) {
^
TypeError: Object.keys called on non-object
at Function.keys (native)
at c:\Users\Jonathon J. Howey\AppData\Roaming\npm\node_modules\dependency-ch
eck\index.js:101:14
at Array.forEach (native)
at c:\Users\Jonathon J. Howey\AppData\Roaming\npm\node_modules\dependency-ch
eck\index.js:100:13
The text was updated successfully, but these errors were encountered: