Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

ErrorCorner

ErrorCorner Logo ErrorCorner Logo

ErrorCorner Navigation

  • Home
  • Contact Us
  • About Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Contact Us
  • About Us
Home/ Questions/Q 239
Next
Answered
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 0
Kenil Vasani
Asked: December 8, 20202020-12-08T03:33:47+00:00 2020-12-08T03:33:47+00:00In: ReactJs

TypeError: Object.entries(…).flatMap is not a function

  • 0

I created a React app and then integrated Tailwind to it. When I ran npm start, I got this error.

TypeError: Object.entries(...).flatMap is not a function[![enter image description here][1]][1]
TypeError: Object.entries(...).flatMap is not a function
    at flattenColorPalette (/media/rishi/142468BD2468A408/web/tailwind-react-demo/node_modules/tailwindcss/lib/util/flattenColorPalette.js:8:83)
    at /media/rishi/142468BD2468A408/web/tailwind-react-demo/node_modules/tailwindcss/lib/plugins/divideColor.js:27:53
    at plugins.forEach.plugin (/media/rishi/142468BD2468A408/web/tailwind-react-demo/node_modules/tailwindcss/lib/util/processPlugins.js:69:5)
    at Array.forEach (<anonymous>)
    at _default (/media/rishi/142468BD2468A408/web/tailwind-react-demo/node_modules/tailwindcss/lib/util/processPlugins.js:63:11)
    at /media/rishi/142468BD2468A408/web/tailwind-react-demo/node_modules/tailwindcss/lib/processTailwindFeatures.js:60:54
    at LazyResult.run (/media/rishi/142468BD2468A408/web/tailwind-react-demo/node_modules/postcss/lib/lazy-result.js:288:14)
    at LazyResult.asyncTick (/media/rishi/142468BD2468A408/web/tailwind-react-demo/node_modules/postcss/lib/lazy-result.js:212:26)
    at LazyResult.asyncTick (/media/rishi/142468BD2468A408/web/tailwind-react-demo/node_modules/postcss/lib/lazy-result.js:225:14)
    at /media/rishi/142468BD2468A408/web/tailwind-react-demo/node_modules/postcss/lib/lazy-result.js:254:14
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tailwind-react-demo7IE72HYHFFCVEZFT437SR8XR http://mail.com/100.1.0 watch:css: `postcss src/assets/tailwind.css -o src/assets/main.css`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the tailwind-react-demo7IE72HYHFFCVEZFT437SR8XR http://mail.com/100.1.0 watch:css script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/rishi/.npm/_logs/2020-11-19T08_16_39_825Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tailwind-react-demo7IE72HYHFFCVEZFT437SR8XR http://mail.com/100.1.0 start: `npm run watch:css && react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the tailwind-react-demo7IE72HYHFFCVEZFT437SR8XR http://mail.com/100.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/rishi/.npm/_logs/2020-11-19T08_16_39_906Z-debug.log
reactjstailwind-css
  • 1 1 Answer
  • 69 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    1. Kenil Vasani

      Kenil Vasani

      • 646 Questions
      • 567 Answers
      • 77 Best Answers
      • 26 Points
      View Profile
      Best Answer
      Kenil Vasani
      2020-12-08T03:33:55+00:00Added an answer on December 8, 2020 at 3:33 am

      I had the same issue today, and solved it updating node to the latest version.

      flatMap was introduced with nodejs 11, you are probably using a lower version, you can check it by running: node -v

      I suggest to manage node versions using NVM

      Very simple to install with cURL: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash then restart your terminal, and to install the latest node version just run nvm install node

      To check if the node version you are using has changed you can run node -v again.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask A Question
    • Popular
    • Kenil Vasani

      SyntaxError: invalid syntax to repo init in the AOSP code

      • 5 Answers
    • Kenil Vasani

      runtimeError: package fails to pass a sanity check for numpy ...

      • 3 Answers
    • Kenil Vasani

      xlrd.biffh.XLRDError: Excel xlsx file; not supported

      • 3 Answers
    • Kenil Vasani

      Homebrew fails on MacOS Big Sur

      • 3 Answers
    • Kenil Vasani

      SQLSTATE[HY000]: General error: 1835 Malformed communication packet on LARAVEL

      • 2 Answers

    Explore

    • Most Answered
    • Most Visited
    • Most Voted
    • Random

    © 2020-2021 ErrorCorner. All Rights Reserved
    by ErrorCorner.com