2
Error: Cannot find module 'node-wit'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/user/Documents/Projects/NodeJS/node-wit/examples/quickstart.js:10:9)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)

I don't know why I got that encountered error by using https://github.com/wit-ai/node-wit.git

My node version is v5.11.1

But I installed npm install --save node-wit got follow error:

enter image description here

PPShein
  • 13,309
  • 42
  • 142
  • 227

1 Answers1

1

you are using the quickstart-example inside the repo itself. it is requiring node-wit in lines 7+8, and in the catch if lines 7+8 fail.

just log the error in the catch, and you will see what went wrong. i suspect that the module itself is not working/buggy, because the require looks correct (require(../') will require the index.js)

hereandnow78
  • 14,094
  • 8
  • 42
  • 48