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

install by docker, Error: Invalid CSS after ".": expected 1 selector or at-rule, was "../common.scss" #3422

Closed
windcatcher opened this issue Jan 15, 2022 · 3 comments
Labels
support A user needs help setting up their development environment

Comments

@windcatcher
Copy link

windcatcher commented Jan 15, 2022

URL

No response

How to reproduce the issue?

1. install it by docker.md

https://github.com/openstreetmap/openstreetmap-website/blob/master/DOCKER.md

2. open the website ,find the problem

the website url is http://10.10.201.81:3000/#map=12/38.8938/-77.0146
Showing /app/app/views/layouts/map.html.erb where line # raised:

Error: Invalid CSS after ".": expected 1 selector or at-rule, was "../common.scss"
on line 1:1 of app/assets/stylesheets/ltr/common.scss

../common.scss

3. run the command ,find this error info

bundle exec image_optim --info

root@7227613449f6:/app# bundle exec image_optim --info
image_optim v0.31.1
config:
verbose: true
nice: 10
threads: 8
pack: false
skip_missing_workers: false
allow_lossy: false
cache_dir:
cache_worker_digests: false
timeout:
PATH: /var/lib/gems/2.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/lib/gems/2.7.0/gems/image_optim-0.31.1/vendor
Resolved jpegrescan 1a762f62 at /var/lib/gems/2.7.0/gems/image_optim-0.31.1/vendor/jpegrescan
Bin resolving errors:
pngcrush worker: pngcrush not found; please provide proper binary or disable this worker (--no-pngcrush argument or :pngcrush => false through options)
pngout worker: pngout not found; please provide proper binary or disable this worker (--no-pngout argument or :pngout => false through options)
advpng worker: advpng not found; please provide proper binary or disable this worker (--no-advpng argument or :advpng => false through options)
optipng worker: optipng not found; please provide proper binary or disable this worker (--no-optipng argument or :optipng => false through options)
pngquant worker: pngquant not found; please provide proper binary or disable this worker (--no-pngquant argument or :pngquant => false through options)
oxipng worker: oxipng not found; please provide proper binary or disable this worker (--no-oxipng argument or :oxipng => false through options)
jhead worker: jhead not found, jpegtran not found; please provide proper binary or disable this worker (--no-jhead argument or :jhead => false through options)
jpegoptim worker: jpegoptim not found; please provide proper binary or disable this worker (--no-jpegoptim argument or :jpegoptim => false through options)
jpegtran worker: jpegtran not found; please provide proper binary or disable this worker (--no-jpegtran argument or :jpegtran => false through options)
gifsicle worker: gifsicle not found; please provide proper binary or disable this worker (--no-gifsicle argument or :gifsicle => false through options)
svgo worker: svgo not found; please provide proper binary or disable this worker (--no-svgo argument or :svgo => false through options)
/var/lib/gems/2.7.0/gems/image_optim-0.31.1/lib/image_optim/worker/class_methods.rb:77:in create_all' /var/lib/gems/2.7.0/gems/image_optim-0.31.1/lib/image_optim/worker/class_methods.rb:48:in create_all_by_format'
/var/lib/gems/2.7.0/gems/image_optim-0.31.1/lib/image_optim.rb:96:in initialize' /var/lib/gems/2.7.0/gems/image_optim-0.31.1/lib/image_optim/runner.rb:56:in new'
/var/lib/gems/2.7.0/gems/image_optim-0.31.1/lib/image_optim/runner.rb:56:in initialize' /var/lib/gems/2.7.0/gems/image_optim-0.31.1/bin/image_optim:18:in new'
/var/lib/gems/2.7.0/gems/image_optim-0.31.1/bin/image_optim:18:in <top (required)>' /usr/local/bin/image_optim:23:in load'
/usr/local/bin/image_optim:23:in `

'_

Screenshot(s) or anything else?

No response

@tomhughes tomhughes added the support A user needs help setting up their development environment label Jan 15, 2022
@mmd-osm
Copy link
Contributor

mmd-osm commented Jan 16, 2022

You can probably completely ignore the output of bundle exec image_optim --info. This is only relevant if you want to optimize images. It's not needed to run the site.

My suggestion would be to double check this issue, which discusses the exact same error message you were getting: #3312 (comment)

-> check your line endings first, and report back afterwards.

@pcimcioch
Copy link

I had exactly the same issue.
app/assets/stylesheets/ltr/common.scss is a symbolic link. But I was using git client that does not support symbolic links, so when I cloned the repo all symbolic links were replaced with normal files containing path of the link.
This is a default behaviour of Windows Git client (although it can be changed).

Make sure you are using Git client that supports symlinks and clone repository again.
If you are working on Windows, then it's better to use some linux distribution using WSL2

@gravitystorm
Copy link
Collaborator

@pcimcioch Thanks for the additional info, hopefully that will help someone in a similar situation.

@windcatcher I'm going to assume that you've either fixed this, found a workaround, or given up already. If you need further support, please open a new issue.

gravitystorm added a commit to gravitystorm/openstreetmap-website that referenced this issue Jul 12, 2023
There are two options for combining stylesheets, using sprockets
(via `require` statements) or using sass (via `@import` statements.

This commit switches to using `@import` statements throughout, to
avoid a bug with libsass that prevents us from using bootstrap 5.2+

See sass/sassc-rails#174

Since R2 is not triggered when `@import`ing a file, we need to
switch the top-level stylesheet names to include the extension. We
can also take the opportunity to remove a level of indirection,
along with removing symlinks which cause problems on some platforms.

* openstreetmap#3984
* openstreetmap#3422
gravitystorm added a commit to gravitystorm/openstreetmap-website that referenced this issue Jul 12, 2023
There are two options for combining stylesheets, using sprockets
(via `require` statements) or using sass (via `@import` statements).

This commit switches to using `@import` statements throughout, to
avoid a bug with libsass that prevents us from using bootstrap 5.2+

See sass/sassc-rails#174

Since R2 is not triggered when `@import`ing a file, we need to
switch the top-level stylesheet names to include the extension. We
can also take the opportunity to remove a level of indirection,
along with removing symlinks which cause problems on some platforms.

* openstreetmap#3984
* openstreetmap#3422
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support A user needs help setting up their development environment
Projects
None yet
Development

No branches or pull requests

5 participants