Closed priyendumori closed 7 years ago
This usually happens if you build a module, then change Node versions.
If you want to use the latest SuperScript version (v1), which doesn't rely on RE2 (and thus doesn't need to build anything) then you should be able to just do:
npm uninstall -g superscript
npm install -g superscript
Otherwise if for some reason you would rather use the legacy v0.12 version:
npm uninstall -g superscript@0.12.2
npm install -g superscript@0.12.2
Let us know how it goes!
This solved the problem thank you. But while installing dependencies locally i.e. while doing the following:
priyendu@priyendu-Inspiron-3542:~/testbot$ npm install
Following warnings occurred: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
I tried to create a bot and run by following these steps: parse npm run build npm start-telnet
output of npm start-telnet is:
testbot@0.0.0 start-telnet /home/priyendu/testbot npm run build && node lib/server-telnet.js
testbot@0.0.0 build /home/priyendu/testbot babel src --presets babel-preset-es2015 --out-dir lib
src/server-telnet.js -> lib/server-telnet.js (node:18872) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html Bot is ready for input! TCP server running on port 2000.
Help me get rid of this DeprecationWarning.
Those warnings are all fine: fsevents
is skipped on Linux, and the DeprecationWarning
is just a Mongoose warning that they're going to use native Promises from v5+, so you don't need to worry about either of those. :)
OK thank you. But still the bot is not replying. What can be done? Attaching a scrrenshot. Bot doesn't reply just waits.
Could you perhaps provide more context - e.g. what are you asking the bot?
It may also be useful to run DEBUG=* DEBUG_LEVEL=verbose npm run start-telnet
to get a full log of what's happening.
I tried debugging but nothing seems wrong. And i posted a screenshot in the last comment. I am just typing hello or hey that is already present in the main.ss file but i am getting no reply. Please do help.
Ah, I see the problem. start-telnet
just starts a server, it doesn't act as a client. You then need to open a new terminal tab and do telnet localhost 2000
to connect to it.
Ah. Didn't realize that. Thank you so much.
No worries, I'll update the Wiki to make this clearer. :)
I created a bot with telnet client using: bot-init testbot --clients telnet
While performing "parse" following error occurs:
parse topics module.js:597 return process.dlopen(module, path._makeLong(filename)); ^
Error: Module version mismatch. Expected 48, got 51. at Error (native) at Object.Module._extensions..node (module.js:597:18) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/usr/lib/node_modules/superscript/node_modules/re2/re2.js:3:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
How can I resolve this?
Versions are mentioned below: node v 6.9.2 npm v 3.10.9 Ubuntu 16.04