mongoskin causing node to crash - "Cannot read property 'name' of undefined" - node.js

I'm trying to learn to use Node.js, aswell as Express.js, Angular.js and MongoDB by following a tutorial, since this would be my first time dabbling with these technologies.
Everything worked perfectly up until the point where I had to test the JSON Objects. (On the end of Step 2: Creating an API with Express).
For some reason, the browser won't connect at all, and on my command line, I get an error that says nodemon app crashed - waiting for file changes before starting. Could that be related?
I'm sorry for how ambiguous the question is, but I'll gladly answer any questions needed in order to get this to work.
Massive thanks in advance

This seems to be a problem with mongoskin module and not your code. Check the versions of your dependencies by running npm version. And try uninstalling and reinstalling mongoskin with
npm uninstall mongoskin --save
npm install mongoskin#1.3.20 --save
per suggestions here.

Related

Webpack loading wrong version of Node Module for Angular project

I have a project in Angular 13. I want to use quillJS and I want to add tables so I tried to install quill-better-table in my project.
For some reason the package is not working. I used the web inspector and found this to be the issue:
ERROR TypeError: quill.keyboard.bindings.Backspace is undefined
The problem seems to be located at: quill_better_table_BetterTable quill-better-table.js:2979 and when I check the debugger I can see the line:
let thisBinding = quill.keyboard.bindings['Backspace'].pop();
quill.keyboard.bindings['Backspace'].splice(0, 1, thisBinding); // add Matchers to match and render quill-better-table for initialization
// or pasting
I found a github repo that had this issue fixed:
https://github.com/LosEcher/quill-better-table
The problem I'm running into is I dont know how to get that particular repo into my project. I have tried updating the current package and webpack continues to load the old one. I've tried clearing the npm cache and reinstalling the node packages.
I found this guide: https://whatapalaver.co.uk/npm-dependency which seems to indicate what I should do but I'm not quite npm literate enough to figure it out. Specifically, I dont know that I understand how to create the NPM link.
I'm looking for advice as to how to fix this package. I am going to be reading up on NPM link but I figured if there was another easier way to get this fixed then I would ask. I can load that repo into my node module folder, but I dont know how to make webpack reload the updated module.
Thanks in advance for the help, let me know what details I for got to add.

Node modules error when starting application

I am getting the following error when starting my app.
I tried updating node, mongo, and typescript but that didn't help. It was working before until it just stopped suddenly, and I didn't touch any of the files listed in the error.
You can also take a look at tsconfig.json
and tsconfig.build.json
.
How to solve this problem?
After looking on the logs. I would suggest this:
remove node_modules
npm i
try to run project
Mostly error are related to the conflicts. It might be due to the updation of your angular, node and mongoose version.

truffle unbox react have Type error default.then is not a function

Recently, I used truffle unbox example. (https://github.com/truffle-box/react-box)
But, I have facing big problem.
When I run my App.js with npm run start, It hasn't compile error.
However, when I connect my application on web browser, It appear error, like this:
I also upgraded my nodejs and npm version, but all my attempting is fail.
My nodejs version is 7.10.1 and npm version is 6.4.1.
Why this error occur? and What is the solution to solve this problem??
Please help me anyone.
What worked for me was calling getWeb3 as a function, then chaining the then.
so instead of getWeb3.then, it's getWeb3().then.

react-native attempting to resolve built-in fetch function

I'm attempting to use the fetch function in react-native to grab a piece of data from the web. from what I understand reading the docs, the fetch function is built in to react-native.
when doing so, I get the module resolution error in the attached screenshot, where for whatever reason the react-native bundler is attempting to use the fetch provided by typescript from my ~/.cache directory.
I've previously had typescript 2.6 installed globally via npm, I uninstalled it to see if that might fix things, but the error persists.
I should note that the only things I've done for this project are to create it with create-react-native-app, add a little snippet to the App.js component stolen from the react docs to fetch some JSON, and yarn run eject the project (this error persisted before and after the ejection)
well in my turkey-induced frenzy, it appears I hadn't properly uninstalled the global typescript install on my computer.
having done so properly, the issue is resolved;
however the issue of react-native's module resolution strategy being incompatible with a global typescript installation persists.

Node won't run, just exits code 0

Well some days ago I was tired to always call sudo when calling npm install and that sort of things so I tried uninstalling node and tried installing via Homebrew, I managed to make a huge disaster but finally it worked. Until now...
When I run node app.js or npm install it just doesn't do anything.
I tried deleting the related files like this.
I tried using nvm.
Tried the manual install with the .pkg file from the node homepage.
Tried through homebrew again.
And still no luck; however if the Node app has compilation errors I get the error stack, but when everything is "ok", instead of start listening for incoming connections it just exits with code 0.
Ok, I feel reaaaaaaaaally stupid after I found the issue, in my postgresql config I had the wrong password for the database and for some reason caused all this mess. Will upvote all of you, will understand if you downvote me for being such a moron.
OneOfOne's node debug then keep pressing s did the trick for me.

Resources