1

I have a Nuxtjs project using Tailwind CSS that was working locally when build with yarn dev until today when I installed Nuxt Scripts in an attempt to get YouTube embeds working per the documentation here: https://scripts.nuxt.com/scripts/content/youtube-player

However, after installing with npx nuxi@latest module add scripts and npm add -D @types/youtube and running npm audit fix my project no longer builds.

I am not even sure how to begin debugging this, but the two errors I am getting:

1: on yarn build or yarn dev

 ERROR  Nuxt Build Error: [@tailwindcss/vite:generate:build] Missing field negated on ScannerOptions.sources                            nuxi 4:10:09 p.m.  
file: [ROOT]/assets/main.css

    at C.generate (/[ROOT]/node_modules/@tailwindcss/vite/dist/index.mjs:1:4303)
    at async Object.transform (/[ROOT]/node_modules/@tailwindcss/vite/dist/index.mjs:1:2354)
    at async transform (/[ROOT]/node_modules/rollup/dist/es/shared/node-entry.js:20906:16)
    at async ModuleLoader.addModuleSource (/[ROOT]/node_modules/rollup/dist/es/shared/node-entry.js:21119:36)
  1. In VS Code, I am getting an error on nuxt.config.ts:
Object literal may only specify known properties, and 'app' does not exist in type 'InputConfig<NuxtConfig, ConfigLayerMeta>'.

Note that if I delete 'app' I get the same error but for the next node in the file.

3
  • Can you try sharing your package.json and package-lock.json? Commented Apr 21 at 1:21
  • Sure. What's the best mechanism for that? Github? Commented Apr 21 at 1:38
  • Ah, simply share your package.json and package-lock.json in the question. It's for checking the versions of your packages. Commented Apr 21 at 2:15

1 Answer 1

0

The problem was I had competing manifests due to using yarn and npm and npx. Steps to fix:

  1. Delete node_modules and package-lock.json (because I have a yarn.lock instead)
  2. Run yarn install

The project is now building and running again locally.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.