Why is nuxt asking for @nuxt/typescript-build

Viewed 763

How do I fix this error - "@nuxt/typescript-build not found"?

WARN  Module @nuxt/typescript-build not found. Please ensure @nuxt/typescript-build 
is in devDependencies and installed. HINT: During build step, for npm/yarn, 
NODE_ENV=production or --production should NOT be used.

The environment is AWS lambda, Node 14. Nuxt is installed with typescript, generated from npm.

2 Answers

Not sure what this one is doing, but this is one of the required packages during the Setup. As shown here: https://typescript.nuxtjs.org/guide/setup#installation

yarn add --dev @nuxt/typescript-build @nuxt/types

Add this to your nuxt.config.js file

export default {
  buildModules: ['@nuxt/typescript-build']
}

Create a tsconfig.json file and you should be good!

If you're exceeding lambda storage limits checkout fume.app

Related