newbeea / nuxt3-apollo-module

33 stars 8 forks source link

Cannot start nuxt: Cannot find module 'nuxt3' #2

Open capoia opened 2 years ago

capoia commented 2 years ago

Hi, it's me again, after the last nuxt update, when I install the package it returns the error "Cannot start nuxt: Cannot find module 'nuxt3' ". Removing the package it works again, I believe it is some reference to the nuxt3 package that no longer exists, after the RC of nuxt it became only nuxt.

image
newbeea commented 2 years ago

Sorry I haven't update nuxt3 for a long time, I'll check this out.

newbeea commented 2 years ago

I updated nuxt to nuxt@3.0.0-rc.4 in the starter https://github.com/newbeea/nuxt3-apollo-starter changed "nuxt3" to "nuxt" in nuxt.config.ts, it worked fine. remember update this module to 0.1.1 because 0.1.0 doesn't work with nuxt@3.0.0-rc.4 in production mode

newbeea commented 2 years ago

@capoia

capoia commented 2 years ago

Thanks a lot for the feedback!

I still can't get it to work, even after updating the package it still returns the same error! Already delete the entire node_modules and package-lock.json, but still no success!

My nuxt.config.ts image

My package.json image

Video

https://user-images.githubusercontent.com/21159928/173602587-9a20eb30-059d-47fb-abca-b01e1bb30610.mp4

Obs: As you can see, with the package it returns that error, when I take it out it works, the error generated is because the package is missing.

newbeea commented 2 years ago

sorry i can not reproduce this, would you please give me a repo what's your node version?

capoia commented 2 years ago

sorry i can not reproduce this, would you please give me a repo what's your node version?

https://github.com/capoia/cubo-bug node: 16.15.1

capoia commented 2 years ago

@newbeea any news?

capoia commented 2 years ago

@newbeea ?

tomhave97 commented 2 years ago

I have the same issue. I guess it comes from the untyped package that comes along with the module npm why untyped atleast gives this reference, and I found out that untyped still uses nuxt3: latest in its package import, might be the issue in the end

tomhave97 commented 2 years ago

I created a PR [https://github.com/unjs/untyped/pull/42] and will create one here to update the package, it should work after that.

capoia commented 2 years ago

@tomhave97 is there any way for me to use your version until the untyped package is updated? I tried going inside node-modules to make the change, but there is no web/nuxt.config.ts for me to modify.

tomhave97 commented 2 years ago

I haven't tried to update it to use the package. Maybe there already is a problem with it trying to get it through the package json, if there is no web directory. But these are wild guesses. I currently hope to get the PR reviewed to check out if a new version of untyped with it will fix it. 😞

tomhave97 commented 2 years ago

@capoia a temporary fix I have found is to change nuxt3 to nuxt where I marked it in: node_modules/@nuxt/kit/dist/index.mjs

image

glopezep commented 2 years ago

Hello, @newbeea is it possible to fix this?