Object.fromEntries is not a function - tailwind-css

I've been following Tailwind's tutorials and when. I get to the part of the tutorial where they ask me to run
-npx tailwindcss init,
-Object.fromEntries is not a function
I get the following error. How do I solve this?
I'm trying to learn tailwind css and I got a problem that I don't understand, please help me guys

first run node -v in your terminal to check you have nodejs or not
then run npm init -y to install dependencies'
then run npm install -D tailwindcss
after that run npx tailwindcss init
hopefully after doing this you will be able to process further into your project

Related

Why do I get "sh: next: command not found" when running a cloned nextjs app?

I've cloned a nextjs example repo locally, and tried to run it using npm run dev, but it's not finding "next" as a command?
sh: next: command not found
I googled it, suggestions seemed to be that I should run
npm i -g create-next-app
Which I did, but still get the same error?
How can I resolve this?
For my particular case, I forgot to run npm install in the repo I'd just cloned :D
Once I did that, running npm run dev worked fine and found next.
But I suspect in general if you're trying to run a cloned repo based on npm, and get a similar response, you may simply have forgotten to install your dependencies, like I did.
Note that this can also happen for an existing project if you have some script that removes the node_modules folder as part of a cleanup process (which I do as well)

Something went wrong installing JavaScript dependencies, check your npm logfile or run npm install again manually [duplicate]

I am using react native and Expo. I am unable to build new app because after I use expo init appName it shows the following error.
Heres the full message:
📦 Using npm to install packages. You can pass --yarn to use Yarn instead.
√ Downloaded and extracted project files.
× Something when wrong installing JavaScript dependencies. Check your npm logs. Continuing to initialize the app.
✅ Your project is ready!
To run your project, navigate to the directory and run one of the following npm commands.
- cd Scanner
- npm start # you can open iOS, Android, or web from here, or run them directly with the commands below.
- npm run android
- npm run ios # requires an iOS device or macOS for access to an iOS simulator
- npm run web
I tried multiple times to create a blank project, also tried npm install to install failed/not downloaded libraries and continue after failure but it showed another error:
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file
also tried npm cache verify that showed cache is ok Content verified: 3562 (252580364 bytes).
So, How can I solve this issue?
Problems related to npm installation are very common If you do any mistake in early installation, but is avoided. Learn more about npm tree.
Steps worked for me are :
npm cache clean --force
npm cache verify
npm -g uninstall expo-cli --save
npm install expo-cli --global
expo init app-name
cd app-name
npm start
Always run as administrator if working on Windows and in root directory.
The solutions above didn't work for me but if you use 'npm install' in the directory of the app you get a clue that you shuold try 'npm install --force'
err message
You should have all these files folders and files at the start of the project otherwise not all the dependencies have been installed which is why we were getting the problem.folder structure
After you have added --force to npm install you have all the dependencies installed. Now you can run the app with npm start.
Unfortunately, all the solutions described above didn't work on my machine...
Here is my latest solution for this problem...
This worked 100% on my machine...
Use npm i -g expo-cli
This will automatically add the required packages and also remove the unnecessary ones.
Yes, surely, you don't need to uninstall and re-install it again.
Just follow my steps.
And, you can create your expo project using expo init.
I hope my solution will help you out from this annoying problem....
I just did npm install and it worked for me, but I had do that every time I create a new expo project.
I also encountered this problem, and finally found that it was the problem of react native cli,I installed the latest version of react native cli,Expo is back to normal
This Error is regarding to the git account. expos need a git account to setup react native project
If you are using windows you need to install git in your local PC
after that open your Terminal and type this command
git config --global user.name "your_username"
git config --global user.email "your_email_address#example.com"
after that clone any github project to your local computer. it will ask to login to Github
after all these steps try expo init <projectname>
The simple way to settle that error is by using "expo-cli init app-name" instead of "expo init app-name".
I tried and worked perfectly for me. Hope it will help you guys.
i have faced a similar problem and running yarn set version 1.22.1 fix it
Run the Command Prompt as an administrator. And run the following command:
npx create-expo-app AwesomeProject

how to make a custom build for tom-select.js?

I can't figure out how to make a custom build for tom-select.js. In the gruntfile.js I see this:
// build tom-select.custom.js
/* this file is generated by grunt when calling `npm run build -- --plugins=<plugins> */
so should I just list the plugins in the command line after npm run build command with --plugins flag? What is the syntax for this? Thanks!
I just found the answer:
create /build/js/tom-select.custom.js
npm run build -- --plugins=remove_button,restore_on_backspace

No valid exports main found on npm (tailwind css)

i am learning tailwind css and in tutorial they write a command like this npx tailwindcss-cli build css/tailwind.css -o build/tailwind.css
and it build a different folder name "tailwind.css" in same directory
but in my case it gives a error
No valid exports main found for 'C:\Users\HHH\AppData\Roaming\npm-cache\_npx\4952\node_modules\tailwindcss-cli\node_modules\postcss'
I don't have any idea what it means and whats wrong with the setup.
please help.
I find the solution.
Just install the current node.js and reinstall the specific version.
download here
After that install it and everything works fine.
Note: It works in when you follow the tailwindcss cli method.
follow first part of video

Npm module "grunt-contrib-imagemin" not found, Is it installed?

I run into this error, when I try to do build a project with "grunt build".
There seems to be no problem when I test the project by doing "grunt server".
The project has been scaffolded and managed with: yeoman/grunt/bower. In Windows.
Everything went well and then a week ago or so it started doing this. I can't build projects no more.
When I try to install the module doing:
npm install grunt-contrib-imagemin
It can never install it, get the following "weird" error.
Any hints please?
Ok I found a way to solve this:
In your package.json, add "jpegtran-bin": "0.2.0" before the reference to imagemin
Delete the node_modules folder in your project, and run "npm install" and "bower install" again
There seem to be an issue with the jpegtran's latest version.
!! - Please note this is just a workarround waiting for the bugfix.
Like the program suggests, you need to install the npm module.
npm i --save-dev grunt-contrib-imagemin
Considering you're on Windows you might want to take a look at the project's GitHub repo for additional installation instructions.
There's an issue with a package contrib-imagemin references that prevents it from properly installing on Windows.
GitHub issue on grunt-contrib-imagemin: https://github.com/gruntjs/grunt-contrib-imagemin/issues/109
GitHub pull request on the offending library: https://github.com/yeoman/node-jpegtran-bin/pull/38
For now, you can manually specify "jpegtran-bin": "0.2.0" in your package.json and it should function as a workaround. If it's a pain point for you, go comment on that pull request and perhaps it'll convince the project maintainer to actually take a look and comment as well.
I had the same problem with 0.3.0 version, but once I updated to 0.4.0 the problem was solved. Check your package.json. Hope that helps!
"grunt-contrib-imagemin": "~0.4.0",
As of May 2015 I solved this by deleting node_modules and running npm install.
I am using windows, I was getting same error.
So I edited the Environmental Variables.
Just add: C:\Ruby200-x64\bin to your PATH variable and restart node prompt.
The imagemin install seems to not run correctly when called by grunt-contrib-imagemin. I just do
cd ./node_modules/grunt-contrib-imagemin/node_modules/imagemin
npm install
And then it's fine.
On Ubuntu 14.04.3 LTS, package.json containing:
"grunt-contrib-imagemin": "~0.4.0",
I had to reinstall Grunt (but the jpegtran-bin workaround, or just removing node_modules and running npm install wasn't enough, I needed the following (with sudo):
rm -rf node_modules/
sudo npm update -g npm
sudo npm install -g grunt-cli

Resources