Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

unable to complete installation due to unresponsive npx commands to create necessary files. #464

Closed
springpong opened this issue Feb 22, 2020 · 6 comments

Comments

@springpong
Copy link

springpong commented Feb 22, 2020

I'm unable to complete the installation due to the below commands not working.

Commands:

  1. $ npx tailwind init --full
  2. $ npx tailwindcss help build
  3. $ npm run build // this was ran after updating the package.json file by removing "start": to "build" as shown in installation process.
  4. $npx tailwind init // Since this command don't work, I created the tailwind.config.js file manually
    Result: Unexpected token

The build along with tailwind.css within the same folder was unable to create.

My setups:
Computer: Mac IOS 10.15.3
node -v: 8.0.0
npm -v: 6.13.7
project type: React

Is there another way of installing?

Also, ran into lots of errors running $ npm install postcss-import, please see attached
postcss install error

I'm super excited in trying out your amazing creation and would appreciate your help in getting it to work.

@springpong springpong changed the title unable to run npx commands create necessary files to my React project. unable to complete installation due to unresponsive npx commands to create necessary files. Feb 22, 2020
@stevecochrane
Copy link

stevecochrane commented Feb 24, 2020

I think gyp: No Xcode or CLT version detected! indicates that you might need to reinstall or update Xcode / Xcode Command Line Tools. Here's an issue from another project with some possible solutions: schnerd/d3-scale-cluster#7

I'm pretty sure I had to update or reinstall my Xcode Command Line Tools when I upgraded to Catalina, and the above error text looks very familiar. I hope this helps.

@springpong
Copy link
Author

springpong commented Feb 24, 2020

Hi Steve,

Thank you for this tip. You're absolutely right, I upgraded Xcode and also the node v8.9.0. Able to run npx tailwind init.

But now I'm stuck with " npm run build". I had edited the package.json file accordingly, but unable to create build/tailwind.css. Here's what it looks like:
npm run build error

Thank you so much for helping.

@stevecochrane
Copy link

Great! I'm glad that helped. As for this part, hmmm... it looks like it should work, though it's failing to find the css/tailwind.css input file. I would double-check the name and location of css/tailwind.css (its location should be relative to the package.json file). Hopefully that's a quick fix.

@springpong
Copy link
Author

I really want to get Tailwind to work, but still struggling with running $ npm run build to generate the build directory with tailwind.css file. I had watched the installation video a few times and had breakthroughs where I got stuck with the previous steps in the installation process.

I'll be grateful for any more tips to overcome this. Or should I give up and use the CDN link ?

I also noticed the tailwind.css file with the @tailwind for base; components; utilities has an error of "unknownAtRule"
Untitled 2

I really appreciate your response.

@stevecochrane
Copy link

Aha, now that I can see the file structure in your latest screenshot, I think it's throwing an error because css/ is within public/.

If you try this, hopefully it'll work: postcss public/css/tailwind.css -o public/build/tailwind.css

As for "unknownAtRule", I think that might just be a warning and it probably won't affect you. It might be validation from VS Code, or if you're using Stylelint, I think it warns about those, and you can suppress the warning through your Stylelint config.

@springpong
Copy link
Author

@stevecochrane ,
I so appreciate your help.Thank you for teaching about getting the path right according to the order of files within the directory.

I also noticed the error messages stating needing node 8.7.0 or above. The build worked after installing that particular version. Now, I'm all setup to use Tailwind. Super excited.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants