How do I start ultra-repl - node.js

I'm using node js v0.12.4 on Win 8 and I have installed ultra-repl using:
npm install ultra-repl
How do I start it? I've tried to start using:
node ultra-repl.js
but I get the error:
d:\Development\Private\WorkspaceServer\messaging\node_modules\ultra-repl\lib\ScopedModule.js:81
if (NativeModule.exists(request)) {
^
TypeError: Cannot read property 'exists' of undefined
at Function._resolveFilename (d:\Development\Private\WorkspaceServer\messaging\node_modules\ultra-repl\lib\ScopedModule.js:81:21)
at Function._load (d:\Development\Private\WorkspaceServer\messaging\node_modules\ultra-repl\lib\ScopedModule.js:102:33)
at Object.<anonymous> (d:\Development\Private\WorkspaceServer\messaging\node_modules\ultra-repl\index.js:3:30)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (d:\Development\Private\WorkspaceServer\messaging\node_modules\ultra-repl\bin\ultra-repl.js:2:18)
Update:
Unfortunately, this no longer works since arguments.callee.caller was deprecated.
Does this mean that ultra-repl is not working at all anymore?

It seems to be broken since at least v0.12.2.
There's an open bug report on Github, but no workaround reported yet.
( I just realised you commented on that bug report, so you obviously already know about it. I'll leave the link in my answer for the sake of others, though. )
If you're willing to use an earlier version of node, you could install one with NVM* and try installing ultra-repl for that version.
* Note: NVM doesn't support Windows, but there are a couple of alternatives for Windows (which seem to share the same interface) linked on its page.

Related

error starting node discordjs, how i can start?

Good, I apologize for the inconvenience, I would like to know if this has happened to someone, I am trying to run a bot in Ubuntu 18, but it does not start, I already installed everything as in Windows but for Ubuntu clearly.
In windows, the same bot works, but when I try to start it in Ubuntu, it throws me this error, I have already installed a thousand things on the machine that literally nothing to do with it.
If someone could help me or allow me where to read, I would be infinitely grateful.
root#ns533280:/home/Discord/Test# node index.js
module.js:487
throw err;
^
Error: Cannot find module 'node:events'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous>
(/home/Discord/Test/node_modules/discord.js/src/client/BaseClient.js:3:22)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
root#ns533280:/home/Discord/Test# node -v
v8.0.0
root#ns533280:/home/Discord/Test# npm -v
5.0.0
How To Solve Error: Cannot find module 'node:events' Error?
To Solve Error:-
Cannot find module 'node:events' Error Minimum required nodejs version is v16.6 in order to use discord.js. So You just need to update nodejs to v16.6. And Your error will be solved.
You use too old version of node.js. According to this doc node 16.6.0 required. Just update your node.js version by install new or by nvm(for manage different node.js version on your PC).

which node.js is needed for Ionic V1.4.3

I want to use Ionic V1.X, since I want to use AngularJS with .js support, instead of Angular with .ts support.
But when I try to run "ionic -v" to see my ionic version it prints out:
ReferenceError: primordials is not defined
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\Users\tubes\AppData\Roaming\npm\node_modules\ionic\node_modules\vinyl-fs\node_modules
aceful-fs\graceful-fs.js:3:27)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
I deinstalled my previous ionic version to reinstall the old one.
I saw online that I could need an older node.js version, but I cannot find which one is needed.
my actual node.js is v12.19.0
Ok, I tried out different node.js
node.js V.6.12.3 seems to work, for anyone who might encounter the same problem

NodeJS CLD package external dependency

I had problem installing CLD package into one of my machine, so I tried to install it into another machine and the installation works perfectly.
In the good machine, I installed the CLD package and wrote a simple app.js around it.
var cld = require('cld');
console.log('cld loaded');
When running this in the good machine, I receive console output "cld loaded" as expected. I copied the exact same code including the node_modules folder into the other machine and run it, I receive errors in the console output:
E:\Test>node app.js
module.js:423
return process.dlopen(module, path._makeLong(filename));
^
Error: The specified procedure could not be found.
\\?\E:\Test\node_modules\cld\build\Release\cld.node
at Error (native)
at Object.Module._extensions..node (module.js:423:18)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (E:\Test\node_modules\cld\index.js:2:12)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
I can confirm the file "E:\Test\node_modules\cld\build\Release\cld.node" is existing. I'm not sure what's the missing procedure here. I suspect there could be some external dependency required for the package.
Could anyone advise what could be the external dependency missing in the first installation?
Figured out it's a node.js version issue. I downgrade my nose.js to 0.10.28 and it works fine. I suppose it's some bug to be fixed by CLD.

Issue with gulp trying to run an example - 'The super constructor to `inherits` must not be null or undefined.'

I'm trying to run an example, but I'm getting the following error when I try to gulp. I'm pretty new to node, so any direction or help would be very appreciated. The install went without any issues, seemingly.
$ nvm exec 4.2.2 gulp
Running node v4.2.2 (npm v2.14.7)
util.js:756
throw new TypeError('The super constructor to `inherits` must not ' +
^
TypeError: The super constructor to `inherits` must not be null or undefined.
at Object.exports.inherits (util.js:756:11)
at Object.<anonymous> ([working directory path]/node_modules/browser-sync/node_modules/http-proxy/lib/http-proxy/index.js:108:17)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> ([working directory path]/node_modules/browser-sync/node_modules/http-proxy/lib/http-proxy.js:4:17)
at Module._compile (module.js:435:26)
It seems this issue has come up in different contexts before but was unanswered:
1) Mean.io application is throwing error with forever
2) https://github.com/rajaraodv/rabbitpubsub/issues/4
Seems to be a fairly recent issue and it seems to not have to do with http-proxy.
Turned out to be a problem with an older version of browser-sync. Once that was updated, this started to work.
Try an older version of Node. The example's package.json specifies Node 0.10 in the engines section, which suggests the initial code may have been written for that version.

Error: Cannot find module 'ms'

I've been trying to get my app running for a few days now, but keep getting errors. I'm closer than I have been so far, but am now getting the "Cannot find module error" when trying to launch my application.
Below is the error I'm getting now.
C:\MY-APP\dataService>node dataAPI.js
module.js:338
throw err;
^
Error: Cannot find module 'ms'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\MY-APP\node_modules\express\node_modules\debug
\debug.js:14:20)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
I also searched the forums for an answer to this question and found this post on Stack Overflow, but it was in reference to Azure, which I'm not using.
I'm new to Node.js so forgive me if I sound like I don't know what I'm talking about because that's largely the truth.
please see this Link :
https://www.npmjs.com/package/ms
and use :
npm install ms -S
on your project its automatically save ms package to the node-module.
Just in case the above answer doesn't work for someone with this problem: I had this same problem when trying to run tests using the Puppeteer framework. I ended up having to cd into the node_modules/puppeteer folder and manually running npm install for it to finally work in my case.

Resources