NodeSecure / cli

JavaScript security CLI that allow you to deeply analyze the dependency tree of a given package or local Node.js project.
MIT License
367 stars 39 forks source link

Error when launching on current directory #8

Closed Tchoupinax closed 5 years ago

Tchoupinax commented 5 years ago

Hello !

I met this following issue when trying to overview my current project. My current directory is the root of my project (With my package.json).

I tried with Node.js 12.10 and 12.8. I'm using Linux. I tried to install nsecure locally for the project and globaly.

I had no problem when using nsecure from xxx

あ→ nsecure cwd

 > Executing node-secure at: /home/me/Documents/myProject

TypeError: nodeSecure is not a function
    at cwd (/home/me/Documents/myProject/node_modules/nsecure/bin/index.js:84:31)
    at Sade.parse (/home/me/Documents/myProject/node_modules/sade/lib/index.js:169:56)
    at Object.<anonymous> (/home/me/Documents/myProject/node_modules/nsecure/bin/index.js:146:6)
    at Module._compile (internal/modules/cjs/loader.js:868:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
    at Module.load (internal/modules/cjs/loader.js:731:32)
    at Function.Module._load (internal/modules/cjs/loader.js:644:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:931:10)
    at /home/me/.nvm/versions/node/v12.8.1/lib/node_modules/npm/node_modules/libnpx/index.js:268:14

Please tell me if you need more precision about my context :)

Thank you :)

fraxken commented 5 years ago

Corrigé sur la version 0.2.1, https://github.com/ES-Community/nsecure/commit/eaf40a2ce1721827eac7beb6f2713d3d16be9bc4.