question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. Itย collects links to all the places you might be looking at while hunting down a tough bug.

And, if youโ€™re still stuck at the end, weโ€™re happy to hop on a call to see how we can help out.

TypeError: input.includes is not a function

See original GitHub issue

Version

@nuxtjs/tailwindcss: 5.3.0 nuxt: 2.15.8

My Tailwind config

/** @type {import('tailwindcss').Config} */ module.exports = { content: [ "./components/**/*.{js,vue}", "./layouts/**/*.vue", "./pages/**/*.vue", "./plugins/**/*.js", "./nuxt.config.js", ], theme: { extend: {}, }, plugins: [ require('@tailwindcss/forms') ], }

Steps to reproduce

Iโ€™ve been using version 5.1.3 without any issues, but the moment I upgraded to 5.2.0 and now also 5.3.0 then, I get the error: TypeError: input.includes is not a function

Version 5.1.3 still works perfectly.

Here are the full error logs: $ nuxt โ„น Using default Tailwind CSS file from runtime/tailwind.css nuxt:tailwindcss

FATAL input.includes is not a function

at normalizeWindowsPath (node_modules/pathe/dist/index.mjs:2:14) at normalize (node_modules/pathe/dist/index.mjs:17:10) at resolvePath (node_modules/@nuxt/kit/dist/index.mjs:340:10) at node_modules/@nuxtjs/tailwindcss/dist/module.mjs:166:75 at Array.map (<anonymous>) at setup (node_modules/@nuxtjs/tailwindcss/dist/module.mjs:166:64) at async ModuleContainer.normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:607:5) at async ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:239:20) at async ModuleContainer.ready (node_modules/@nuxt/core/dist/core.js:51:7) at async Nuxt._init (node_modules/@nuxt/core/dist/core.js:478:5)

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ โ”‚ โ”‚ โœ– Nuxt Fatal Error โ”‚ โ”‚ โ”‚ โ”‚ TypeError: input.includes is not a function โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

error Command failed with exit code 1.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pencilcheckcommented, Oct 7, 2022

@phillipstemann btw you should also print out the line

    if (typeof cssPath === "string") {
      if (existsSync(cssPath)) {
        logger.info(`Using Tailwind CSS from ~/${relative(nuxt.options.srcDir, cssPath)}`);
        resolvedCss = cssPath;
      } else {
        logger.info("Using default Tailwind CSS file from runtime/tailwind.css");
        resolvedCss = createResolver(import.meta.url).resolve("runtime/tailwind.css");
      }
    }
    nuxt.options.css = nuxt.options.css ?? [];
    console.log('nuxt.options.css', nuxt.options.css)
    const resolvedNuxtCss = await Promise.all(nuxt.options.css.map((p) => resolvePath(p)));

and see for yourself what is wrong, for me somehow nuxt-highlightjs injected an object instead of a string in the css array, and an object is not normalizable for the path and thatโ€™s why it errored out.

0reactions
mena234commented, Nov 3, 2022

@pencilcheck @phillipstemann This should be fixed in the new version 6.1.3. Issue, pull request

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using .includes method in a function - javascript - Stack Overflow
So what the error is trying to tell you is that the value for variable value , e.g. an integer or object, does...
Read more >
TypeError: includes is not a function in JavaScript | bobbyhadz
The "includes is not a function" error occurs when the includes() method is called on a value that is not of type string...
Read more >
How to solve includes is not a function in JavaScript - Reactgo
The โ€œincludes is not a functionโ€ error occurs when we call a includes() method on a value other than the strings or arrays....
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >
How to Handle JavaScript Uncaught TypeError: โ€œxโ€ is Not a ...
The Javascript error TypeError: "x" is not a function occurs when there is an attempt to call a function on a value or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found