#Issue compiling nestjs project, i receive lots of errors
54 messages · Page 1 of 1 (latest)
Hello @hard viper Thank you so much for your quick reply.
Let me try it and post the results to you.
yes probably you are right, what do i do to resolve this problem
i tried everything and im not a nestjs developer.
any help is appreciated.
This is not related to NestJS at all, it's just Typescript.
Did it compile with the flag set to true?
no it didnt
same
should i remove any directories and run npm install again?
do you want me to share some files with you to review like package.json?
Hm, I don't see anything wrong at first glance. I just checked the compatible versions for NestJS 7 and it matches.
When i run npm install i get this
Did the project have a package-lock.json?
yes and i deleted it and node_modules and tried npm install
do you want a copy of the package-lock.json file?
so the build didn't work even with the original package lock?
I've never seen these checks 🤔
I would try unsintalling the types for the serve static module and trying the build again
what command would i use please?
im not familiar with nestjs or typescript at all
any help is appreciatd.
@hard viper any help?:)
npm uninstall <package name>. But I'm sorry, we're here to help mainly with the NestJS framework. What you have is a problem with typescript and Node.js in general, so it might be better to ask in another place. I recommend https://discord.gg/typescript or https://discord.gg/programming
thank you
Hello guys hope you are all well, im still having issues not being able to nest build the project
Im getting these two errors now.
Thats the package.json file.
What's the issue?
Can someone help please?
I managed to get this to work by adding .npmrc
legacy-peer-deps=true
My only issue now is something in the code itself which i posted above.
Can someone please assist?
The method should always return ContentDto, as per the return type annotation, but the implementation of the method says something different. It either returns something without uid and phraseKey, which is not compatible with ContentDto, or it returns undefined, which is also totally not ContentDto.
Hi @hard viper thank you, so whats the solution here? I didnt write this app, not sure what to do.
attaching the two files
I have no idea, I also did not write that app 😄 if you just want to get rid of the typescript error while preserving the obviously wrong behavior, just cast the result to any or put //@ts-ignore before the faulty line
This line here too