Normal imports throwing errors?
Unanswered
Philadelphia Vireo posted this in #help-forum
Philadelphia VireoOP
I have the following imports on top of my file (see image), these appear normal imports and are straight from documentations. however, it throws these errrors for me: "annot find module 'next/server'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?ts(2792)" Now, i want to avoid settings moduleresolution to node. What could be the cause of this?
3 Replies
Donskoy
What is your TypeScript
moduleResolution set to?@Donskoy What is your TypeScript `moduleResolution` set to?
Philadelphia VireoOP
bundler
Donskoy
Okay, that should be fine I think. Have you tried changing it to
node just to see if it works? Otherwise, which version of next do you have installed, is it definitely installed (npm install), and are you using a monorepo where it might be struggling to find next.