Hello,
I update my Needle project with npm update and Needle to 2.51.0.
It works really good in developement, but if I try to Build and Deploy.
My Typescript rise lot of errors due to new types, which could not be assign anymore. Do you have a solution to update it without change all of my variables in my project ?
Original Post on Discord
by user 224464722878005248
You need to update the types in your package.json, see: Discord
after that add skipLibCheck
to your tsconfig because the new types contain a few errors themselves unfortunately
skipLibCheck: true ?
by user 224464722878005248
in compilerOptions ?
by user 224464722878005248
Okay so t resume it :
In
your main project package.json
verify that :
“@types/three”: “^0.146.0”,
Same for you nodes_modules/@needle-tools/engine
In its package.json
“@types/three”: “^0.146.0”,
After it
In you main tsconfig.json :
by user 224464722878005248
**{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ESNext", "DOM"],
"moduleResolution": "Node",
"strict": true,
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"noEmit": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noImplicitAny": false,
"experimentalDecorators": true,
"skipLibCheck": true
},
"include": ["./src"]
}
by user 224464722878005248
After it delete the @types in your nodes/modules
by user 224464722878005248
After it re-install
by user 224464722878005248
by user 224464722878005248
Thanks @maXR for the help, again
by user 224464722878005248
Hi. I followed your steps but** I still get the error**.
First in main project package.json, I changed “@types/three”: “0.146.0”
Then added “skipLibCheck”: true to tsconfig.json of main project,
And finally deleted the @types folder from nodemodules and re-install
by user 761182854012731394
Did you verify “@types/three”: “0.146.0” in your engine node_modules too ?
by user 224464722878005248
Yes
by user 761182854012731394
“three” module error. I have npm def, do I need to change it there too (the peer dependencies)
by user 761182854012731394
Do you mean when you build? Which error exactly? You might need to add the libCheck to the tsconfig in there too yes
Yes the error is when I build for production, local works fine
by user 761182854012731394
Yes then its probably the same just from the tsconfig of your other packages