santinic / how2

AI for the Command Line
https://how2terminal.com
MIT License
5.72k stars 154 forks source link

OSX problem TypeError: Cannot read property 'prototype' of undefined #96

Closed dataf3l closed 5 years ago

dataf3l commented 5 years ago

I'm using node8

$ yarn install -n how2 yarn install v1.17.3 info No lockfile found. [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... success Saved lockfile. ✨ Done in 0.11s.

$ how2 help /usr/local/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59 Transport.prototype.proto = EventEmitter.prototype; ^

TypeError: Cannot read property 'prototype' of undefined at Object. (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59:46) 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. (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/stream.js:8:17) at Module._compile (module.js:652:30)

$ node --version v8.11.3

dataf3l commented 5 years ago

I updated node to 12 and I still have the same problem:

[b@localhost:~]$ which node /usr/local/bin/node [b@localhost:~]$ node --version v12.11.0 [b@localhost:~]$ npm install -g how2 /usr/local/bin/how2 -> /usr/local/lib/node_modules/how2/bin/how2

TypeError: Cannot read property 'prototype' of undefined at Object. (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59:46) at Module._compile (internal/modules/cjs/loader.js:945:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10) at Module.load (internal/modules/cjs/loader.js:798:32) at Function.Module._load (internal/modules/cjs/loader.js:711:12) at Module.require (internal/modules/cjs/loader.js:838:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/stream.js:8:17) at Module._compile (internal/modules/cjs/loader.js:945:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10) [b@localhost:~]$

PaoloCifariello commented 5 years ago

Hi @dataf3l. This is an issue with devnull dependency that was already discussed and solved. (https://github.com/santinic/how2/issues/89)

TL DR. You should use how-2 instead of how2 to get last updates.