this.assertNotInPreviewMode not found when running a NestJS microservice - node.js

I have a microservice setup using NestJS. However I get the following error when running it.
this.assertNotInPreviewMode('listen');
^
TypeError: this.assertNotInPreviewMode is not a function
I have installed the NestJS microservices package using npm i --save #nestjs/microservices. Have no clue as to why that function would not exist.

I had the same error today and npm update helped

If you open your test folder you will see the file app.e2e-spec.ts you can comment or delete the code inside the describe method.
This will solve your problem.

Related

Module '"../../parse5/lib"' has no exported member 'ElementLocation' - Angular Universal Firebase deployment error

i have a problem with deployment of angular universal on firebase hosting. I am following deployment on circleci and i am getting this error below in their console. Is that related to node version or what?
I dont know where to start finding the solution.
I found a solution for me in this issue report https://github.com/DefinitelyTyped/DefinitelyTyped/issues/26338
I have to install npm i --save-dev #types/jsdom#11.0.4
It's weird, because I've never had a error like that
"Quick fixed it by updating parse5 package.
try to run npm i -D parse5#latest"
https://github.com/scullyio/scully/issues/370#issuecomment-601787438

Twilio Video Startup

I am fairly new to React and am trying to run an example to get started with understanding how Twilio interfaces with React/Node. I am currently using the repo https://github.com/twilio/twilio-video.js, and am trying to run the test > framework > twilio-video-react, but when I npm install then npm start, the server starts, but throws the error:
Failed to compile
./src/App.js
Module not found: Can't resolve 'twilio-video'
I did `npm install twilio-video`, but still throwing error. What am I missing here? Can anyone else get this example started? I want a base example with Twilio Video working with React so I can learn from there, any other resources would help, thanks!
I tried these two examples as well, but they are outdated:
https://www.twilio.com/blog/2018/03/video-chat-react.html
https://www.twilio.com/blog/2016/03/building-a-react-powered-video-chat.html
Okay, got an example up and running with a little fudging.
I followed this example: https://www.twilio.com/blog/2018/03/video-chat-react.html
But there were a few old libraries that were causing errors.
Posted a working version on my Github linked here.

JHipster - prod build is not working correctly

I worked a lot on my JHipster project. After 3 weeks I packaged the project again and tried to run the war.
The war is running but the problem is that there is a problem with the frontend. It shows the Hipster error "An error has occured :-(...".
The console logs:
Uncaught TypeError: Cannot read property 'concat' of undefined
at Module.503
I'm just confused because when I run npm start, everything works. I didn't change the webpack or package.json. I'm using the newest JH version.
I solved my issue. We are using index files in Angular. The order of the exports was not correct. We exported the module first and the module tried to access data from the index which was not exported at this time.
Hope I could help you.

Node.js module is looking for node-modules instead of node_modules

I have the following based on instructions from here:
const Pubgapi = require('pubg-api');
const apiInstance = new Pubgapi('api-key');
For some reason when I run it, the console says unable to resolve path but it's looking for a node-modules which I don't have. This is an API wrapper that I am trying to use by the way. What could cause it to give me this error?
I did an npm install as the instructions said and nothing else before the statements above.
Error message:
Unable to resolve ../node-modules/pubg-api" from ".//components/Main.js`: The module `../node-modules/pubg-api` could not be found"
I have checked the node_modules folder. It is indeed pubg-api, not pubg_api. Requiring pubg_api gives me this error.
This error is probably related to the HTTPS library that the library you are trying to install depends on. Node.js libraries are not compatible with react-native since it is not working on a Node.js platform.
To overcome this issue you can try to use react-native-http library, but I did not try to use it before, so I'm not sure if it's going to work or not.

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

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.

Resources