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

Browserlist: caniuse-lite is outdated. Installation instructions are not clear. #173

Open
Kaszanas opened this issue May 3, 2022 · 3 comments

Comments

@Kaszanas
Copy link

Kaszanas commented May 3, 2022

While setting up PAWLS according to the instuctions in READMEthere are multiple errors and the documentation is not clear how to proceed with this software.

In the end when using docker-compose up the software builds but fails to start.

When attempting to visit the localhost:8080 the following error is shown:

pawls-ui-1      | Browserslist: caniuse-lite is outdated. Please run:
pawls-ui-1      | npx browserslist@latest --update-db
pawls-ui-1      |
pawls-ui-1      | Why you should do it regularly:
pawls-ui-1      | https://github.com/browserslist/browserslist#browsers-data-updating
pawls-api-1     | INFO:     172.19.0.6:44274 - "GET / HTTP/1.1" 204 No Content
pawls-ui-1      | Failed to compile.
pawls-ui-1      |
pawls-ui-1      | src/App.tsx
pawls-ui-1      |   Line 1:4:    Delete `␍`  prettier/prettier
pawls-ui-1      |   Line 2:69:   Delete `␍`  prettier/prettier
pawls-ui-1      |   Line 3:3:    Delete `␍`  prettier/prettier
pawls-ui-1      |   Line 4:82:   Delete `␍`  prettier/prettier
pawls-ui-1      |   Line 5:78:   Delete `␍`  prettier/prettier
@codeviking
Copy link
Contributor

codeviking commented May 4, 2022

The browserlist error is a warning. I don't think it's what's actually causing a problem.

The other errors shown there are emitted by prettier, a tool we use for formatting. Based on the message, I think you might be trying to run things on windows.

You could try porting over this change, or removing the volumes from the docker-compose.yaml file:

-         volumes:
-             - ./ui/src:/usr/local/src/skiff/app/ui/src
-             - ./ui/public:/usr/local/src/skiff/app/ui/public
-             - ./ui/package.json:/usr/local/src/skiff/app/ui/package.json
-             - ./ui/tsconfig.json:/usr/local/src/skiff/app/ui/tsconfig.json
-             - ./ui/yarn.lock:/usr/local/src/skiff/app/ui/yarn.lock

I'd do that for both the api and ui services to see if it resolves the issue. My guess is there's something weird going on when mounting files from a Windows host into a Linux container (it looks like prettier is getting tripped up on the line end characters). But I could be wrong.

If that doesn't work you could try removing the .eslintrc file so that it'll use defaults that might not cause the problem you're running into. If you're not contributing fixes back here then you don't need to worry about running the formatter. If you do we can figure out what do once you've prepared a patch.

Sorry for the trouble! Let me know if either of these things help!

@Kaszanas
Copy link
Author

Kaszanas commented May 6, 2022

Thank you for the response, I will try to apply the suggestions and verify if the software runs.

@zeno17
Copy link

zeno17 commented Jan 22, 2024

I tried the instructions above and they did not help.

Eventually, I got it running by going to the https://github.com/allenai/pawls/blob/main/ui/.eslintrc.js file and adding the following to the rules setting:

"prettier/prettier": ["error", {"requirePragma": true, } ]

The file finally looks like this

module.exports = { extends: ['@allenai/eslint-config-varnish'], rules: { 'eol-last': ['error', 'always'], "prettier/prettier": ["error", {"requirePragma": true, } ] }, };

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

3 participants