third-parties package is missing
Unanswered
Common Greenshank posted this in #help-forum
Common GreenshankOP
import { GoogleTagManager } from '@next/third-parties';
// Cannot find module '@next/third-parties' or its corresponding type declarations. (tsserver 2307)I'm not sure it's just type problem or not.
10 Replies
@Common Greenshank
import { GoogleTagManager } from '@next/third-parties';
// Cannot find module '@next/third-parties' or its corresponding type declarations. (tsserver 2307)
I'm not sure it's just type problem or not.
you have made sure that
@next/third-parties is in your package.json file and you have installed it (ie npm i)?@riský you have made sure that `@next/third-parties` is in your package.json file and you have installed it (ie npm i)?
Common GreenshankOP
Yes. Component works fine but type is not found.
o.O try restarting vscode
@riský o.O try restarting vscode
Common GreenshankOP
sadly, it doesn't work.
FYI
next 13.4.4
@next/third-parties 14.0.1
tsconfig
FYI
next 13.4.4
@next/third-parties 14.0.1
tsconfig
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"paths": {
"@/*": ["./*"],
"@root/*": ["./*"],
"@__test__/*": ["./__test__/*"],
"@components/*": ["./src/components/*"],
"@pages/*": ["./src/pages/*"],
"@common/*": ["./src/common/*"],
"@lib/*": ["./src/lib/*"],
"@generated/*": ["./generated/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}lol why aren't you using latest nextjs version? (like they are meant to be the same version number)
Common GreenshankOP
That's our maintenance issue, I checked compatibility from here:
https://github.com/vercel/next.js/pull/57515
https://github.com/vercel/next.js/pull/57515
Polar bear
Running into the same issue here with next and next/third-parties latest version
Any updates on this?
"@next/third-parties": "^14.0.2",
"next": "^14.0.2",Any updates on this?
Same it's a bug, you'd want to open a ticket I think
The problem is that third-parties doesn't have exported types, so only thing you can do rn is mark it with
// @ts-expect-error -- package types missing
import { GoogleTagManager } from '@next/third-parties/google';Havana
I've got 2 projects both running Next 13. I've just installed this library in both repos today and only get this issue in 1 project. Very strange.