nuxt: Nuxt Installation failed
Environment
macOS Monterey Macbook Air M2 (2022) Node.js v18.13.0
Reproduction
No production is required I guess.
Describe the bug
Recently I tried to install nuxt, but got an error on installation command npm install.
Something wrong with the nuxt’s package.json . error message: No “exports” main defined in …/node_modules/nuxt/package.json
Additional context
No response
Logs
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (9 by maintainers)
I have fixed this issue on Windows after 1 month of trying xD,
I have deleted node_modules located in C:/Users/{PC_NAME}/node_modules
And hit npm i on my project
closing as it seems this is resolved upstream: https://github.com/nuxt-modules/i18n/issues/1976
Just sharing a workaround for the initial issue that worked for a friend of mine, @danielphilipjohnson:
Deleting your global node modules folder seems to have sorted the issue out for him.
Would you check whether you have a node_modules folder in a parent directory, perhaps with Nuxt 2 installed? Or indeed, if you have Nuxt 2 installed globally?