experienced issue with expressjs/nodejs after updating connect - connect

I am currently using the following versions of node & express (ubuntu):
node: 0.6.12
express: 2.5.8
I believe I am using connect v2.0.3.
The error spawns from the http/https.js files inside the express/lib/http.js files (I am referencing http/https in my main app js file):
TypeError: Cannot read property 'prototype' of undefined
express/lib/http.js:50:35
Any thoughts would be welcome on how to resolve the issue - do I need to change the connect version being used or some other solution that can be used to resolve the issue.
Thanks.

Even though the readme file says that it's compatible with node 0.6x, I've generally had plenty of issues with connect and have solved them by installing an older version of it. Try the latest of v1 - npm install connect#1.8.6

Related

Compatibility issues Node and Strapi4

allow me to walk you through some problems I'm encountering when setting up Gatsby with Strapi. Hopefully, somebody can provide me with a solution. Whenever I use the following command yarn create strapi-starter strapi-test gatsby-blog I get the following error:
So what I do next is switching to node v15 using nvm to make strapi compatible with node. The result being that some packages are being installed followed by yet another compatibility error:
Therefore, I am wondering what I am doing wrong and how to make strapi4 compatible with node without having the errors above?
Use Node.js v16 rather than v15. It should fix the issue.
Besides, it's better to use even-numbered version of Node.js, as they're LTS.

NodeJS-MSMQ: SyntaxError: Cannot use import statement outside a module

I'm pretty new with NodeJS and I'm trying to use a module called "updated-node-msmq" (from this repository) in my project but getting an error.
What I've done:
I opened a new folder for the project.
I used the command "$ npm install --save updated-node-msmq" and got some warnings (Screenshot attached).
When I try to use the module according to the README, and run my "test.js" file I got the following error here in the screenshot).
I am using version 14.16.0 of NodeJS and after trying to fix this myself I realized that probably the problem is that the module was built for older versions of NodeJS.
I understand that low version is not a recommended solution, but I have no clue how to update a module.
Help / guidance in solving the problem?
Thanks in advance everyone!
Why are you using updated-node-msmq? That package seems like a mess, and the errors you are getting is because the whole module is written with ES2015 but doesn't seem to have been transpiled to node.js compatible code before published to NPM.
I'd advise you to use a tried and tested module for MSMQ first and foremost.
EDIT: Seems like the author fucked up in the 0.2.0 version. You could use the 0.1.9 (by instead using npm install updated-node-msmq#0.1.9 but that one is 3 years old.

Node Sass error in Angular: Mixins may not be defined within control directives or other mixins

I have a project written in Angular 4 and I am trying to build it, but I keep getting this error: Mixins may not be defined within control directives or other mixins.
I've looked around on the internet and I saw some recommendations to downgrade node-sass to the version 4.8.1, but when I tried to do this, I got a 404 erro from Github:
> node-sass#4.8.1 install c:\my-project\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node":
HTTP error 404 Not Found
And sure enough, this address: https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node doesn't exists. My guess is because there are new versions of node-sass available and the 4.8.1 was pushed back to the second page: https://github.com/sass/node-sass/releases?after=3.5.3.
I know that I am using a very old version of Angular and I have plans to upgrade it, but I don't have the time to do this now, has someone managed to solve this?
Download win32-x64-64_binding.node, put in the local:
C:\Users\{username}\AppData\Roaming\npm-cache\node-sass\4.8.1\
Then install again.

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.

sails js running testProjects issue in ubuntu

I am new to nodejs and after installing sails when i try to run it, using command sails lift, it gives me below error. Need help to resolve it.
/usr/lib/node_modules/sails/node_modules/waterline/node_modules/lodash/index.js:692
function runInContext(context) {
^
illegal access
It was an issue with the version of node i was using v0.11.13. I have changed the version and it started working.

Resources