Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken normalize import when yarn isn't installed #919

Closed
anhari opened this issue Jun 23, 2018 · 10 comments
Closed

Broken normalize import when yarn isn't installed #919

anhari opened this issue Jun 23, 2018 · 10 comments

Comments

@anhari
Copy link

anhari commented Jun 23, 2018

Ran into this when it seemed like suspenders created a new project without any errors:

File to import not found or unreadable: normalize.css/normalize.

I had to track down how normalize was installed by digging into the source code. Seems like a preliminary check for a yarn installation might be necessary.

@ZASMan
Copy link

ZASMan commented Sep 6, 2018

Anyone ever find a fix for this? i'm having the same issue.

@swedishpotato
Copy link

I just tried to use Suspenders and I have to admit to disappointment. If it is supposed to help people launch a new app quickly with lots of bells and whistles attached it simply doesn't work. First there are a load of "hidden" ENV variables to add in both staging and production, which are then incompatible with SENDGRID ENV variables supplied by Heroku. After that it simply falls over with this normalize issue above, so now I'm giving up and going back to the old "rails new" instead. A pity. It shows promise but it simply doesn't work out of the box and after three hours of hacking around I'm giving up.

@delphaber
Copy link
Contributor

delphaber commented Sep 15, 2018

Anyone ever find a fix for this? i'm having the same issue.

If you want to use yarn to retrieve assets, you have to install it first from https://yarnpkg.com/en/docs/install. Otherwise, you can remove the @import 'normalize.css/normalize' line from application.css

I think it could be a note in the readme about yarn dependency 🤔

I just tried to use Suspenders and I have to admit to disappointment. If it is supposed to help people launch a new app quickly with lots of bells and whistles attached it simply doesn't work. First there are a load of "hidden" ENV variables to add in both staging and production, which are then incompatible with SENDGRID ENV variables supplied by Heroku. After that it simply falls over with this normalize issue above, so now I'm giving up and going back to the old "rails new" instead. A pity. It shows promise but it simply doesn't work out of the box and after three hours of hacking around I'm giving up.

Feel free to contribute :)

@anhari
Copy link
Author

anhari commented Sep 26, 2018

I think a note in the readme might suffice. I was thinking we could also add run "yarn --version" to check for a yarn installation in one of the generators and display installation instructions if nothing is found.

@ACPK
Copy link

ACPK commented Oct 12, 2018

@anhari @delphaber - Suspenders worked locally for me, but I hit this issue when deploying to Heroku.

To fix the issue on Heroku, I had to add the code below to my Gemfile:

gem "webpacker", require: false

@delphaber
Copy link
Contributor

I had to add nodejs as a buildpack BEFORE the ruby one on heroku. No need for webpacker 🤔 .

Take a look at #930

@composerinteralia
Copy link
Contributor

Suspenders is now on Rails 6, which uses yarn and webpacker by default. If you don't have yarn installed it will print:

Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/

@composerinteralia
Copy link
Contributor

I just saw this error again when trying to deploy a newly created application to Heroku. I am using yarn, but normalize still isn't available. I think this is because the suspenders:stylesheet_base generator does not run by default when the application is created. We should move the normalize import into that generator.

@composerinteralia
Copy link
Contributor

Actually, this was the same problem. Something was up with my yarn install. It was still confusing, so I will leave this issue open. I wonder if we can fail right away with a more obvious message if yarn is not installed?

@stevepolitodesign
Copy link
Contributor

This might be rendered obsolete by #1135. We now check if Node is installed via #1201 and #1202.

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

No branches or pull requests

7 participants