So I recently created a new project at home using .NET Core with a Nuxt.js front-end.
I know the site ran when it was just a Vue app. I know the site ran when it was a base Nuxt.js app after following this post.
Then I wanted to add some features we use on the Nuxt project I inherited at work but I'm running into this error when I try to build it.
FATAL Cannot import module '@nuxt/builder' 16:16:47
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Module.require (internal/modules/cjs/loader.js:1080:19)
at n (node_modules\jiti\dist\v8cache.js:2:2472)
at Object.<anonymous> (node_modules\webpack-dev-middleware\dist\utils\setupHooks.js:8:39)
at Module.o._compile (node_modules\jiti\dist\v8cache.js:2:2778)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Module.require (internal/modules/cjs/loader.js:1080:19)
I can see that @nuxt/builder is referenced in my package-lock.json file at work, but it is not referenced in the package.json file.
I tried installing the 'missing' package in my home project yet the error remains.
It feels like - from what I've read - that this package is built into Nuxt in some fashion, but that Nuxt has lost it's marbles and isn't finding it.
What can I do to fix this as there are no examples I can find through searching that covers this specific failure, so I'm blocked and don't know how to move forward. I'd prefer not to start all over again, plus I'm keen to understand the root cause.
Any help is truly appreciated.