alephdata / aleph

Search and browse documents and data; find the people and companies you look for.
http://docs.aleph.occrp.org
MIT License
2k stars 268 forks source link

aleph_ui fails to start in developer mode #2163

Open Julm opened 2 years ago

Julm commented 2 years ago

aleph_ui_1 fails to start: SassError: File to import not found or unreadable: ~src/app/tables

Environment:

Details :

docker-compose -f docker-compose.dev.yml up -d --remove-orphans \
        postgres elasticsearch ingest-file \
        convert-document
aleph_postgres_1 is up-to-date
aleph_redis_1 is up-to-date
aleph_convert-document_1 is up-to-date
aleph_elasticsearch_1 is up-to-date
aleph_ingest-file_1 is up-to-date
docker-compose -f docker-compose.dev.yml up api ui
aleph_postgres_1 is up-to-date
aleph_redis_1 is up-to-date
aleph_elasticsearch_1 is up-to-date
aleph_convert-document_1 is up-to-date
aleph_ingest-file_1 is up-to-date
Creating aleph_api_1 ... done
Creating aleph_ui_1  ... done
Attaching to aleph_api_1, aleph_ui_1
api_1               |  * Serving Flask app 'aleph.wsgi' (lazy loading)
api_1               |  * Environment: production
api_1               |    WARNING: This is a development server. Do not use it in a production deployment.
api_1               |    Use a production WSGI server instead.
api_1               |  * Debug mode: off
ui_1                |
ui_1                | > aleph-ui@3.12.1 start
ui_1                | > react-scripts start
ui_1                |
ui_1                | [HPM] Proxy created: /  -> http://api:5000
ui_1                | ℹ 「wds」: Project is running at http://172.24.0.8/
ui_1                | ℹ 「wds」: webpack output is served from
ui_1                | ℹ 「wds」: Content not from webpack is served from /alephui/public
ui_1                | ℹ 「wds」: 404s will fallback to /
ui_1                | Starting the development server...
ui_1                |
api_1               | 2022-03-15 16:40:34.084901 [warning  ]  * Running on all addresses.
api_1               |    WARNING: This is a development server. Do not use it in a production deployment. [werkzeug]
api_1               | 2022-03-15 16:40:34.085332 [info     ]  * Running on http://172.24.0.7:5000/ (Press CTRL+C to quit) [werkzeug]
api_1               | 2022-03-15 16:40:34.088325 [info     ]  * Restarting with stat        [werkzeug]
api_1               |  * Debugger is active!
api_1               |  * Debugger PIN: 881-054-759
ui_1                | Failed to compile.
ui_1                |
ui_1                | ./src/screens/SystemStatusScreen/SystemStatusScreen.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/react-scripts/node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/screens/SystemStatusScreen/SystemStatusScreen.scss)
ui_1                | SassError: File to import not found or unreadable: ~src/app/tables.
ui_1                |         on line 1 of src/screens/SystemStatusScreen/SystemStatusScreen.scss
ui_1                | >> @import "~src/app/tables";
ui_1                |
ui_1                |    ^
ui_1                | Compiling...
ui_1                | Failed to compile.
ui_1                |
ui_1                | ./src/screens/SystemStatusScreen/SystemStatusScreen.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/react-scripts/node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/screens/SystemStatusScreen/SystemStatusScreen.scss)
ui_1                | SassError: File to import not found or unreadable: ~src/app/tables.
ui_1                |         on line 1 of src/screens/SystemStatusScreen/SystemStatusScreen.scss
ui_1                | >> @import "~src/app/tables";
ui_1                |
ui_1                |    ^
^CGracefully stopping... (press Ctrl+C again to force)
Stopping aleph_ui_1  ... done
Stopping aleph_api_1 ... done

on container aleph_ui_1

> aleph-ui@3.12.1 start
> react-scripts start
[HPM] Proxy created: / -> http://api:5000
ℹ 「wds」: Project is running at http://172.24.0.8/
ℹ 「wds」: webpack output is served from
ℹ 「wds」: Content not from webpack is served from /alephui/public
ℹ 「wds」: 404s will fallback to /
Starting the development server...
Failed to compile.
./src/screens/SystemStatusScreen/SystemStatusScreen.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/react-scripts/node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/screens/SystemStatusScreen/SystemStatusScreen.scss)
SassError: File to import not found or unreadable: ~src/app/tables.
on line 1 of src/screens/SystemStatusScreen/SystemStatusScreen.scss
>> @import "~src/app/tables";
^
Compiling...
Failed to compile.
./src/screens/SystemStatusScreen/SystemStatusScreen.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/react-scripts/node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/screens/SystemStatusScreen/SystemStatusScreen.scss)
SassError: File to import not found or unreadable: ~src/app/tables.
on line 1 of src/screens/SystemStatusScreen/SystemStatusScreen.scss
>> @import "~src/app/tables";
^
Rosencrantz commented 2 years ago

@Julm Thanks for being so patient, are you still struggling with this issue? Do you receive the same error when you run make all or make dev?

moovlib commented 2 years ago

Hello, I have exactly the same problem, how was the problem solved?

aleph-ui@3.12.3 start

react-scripts start

[HPM] Proxy created: / -> http://api:5000

ℹ 「wds」: Project is running at http://172.18.0.8/

ℹ 「wds」: webpack output is served from

ℹ 「wds」: Content not from webpack is served from /alephui/public

ℹ 「wds」: 404s will fallback to /

Starting the development server...

Failed to compile.

./src/screens/SystemStatusScreen/SystemStatusScreen.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/screens/SystemStatusScreen/SystemStatusScreen.scss)

SassError: File to import not found or unreadable: ~src/app/tables.

    on line 1 of src/screens/SystemStatusScreen/SystemStatusScreen.scss

@import "~src/app/tables";

^

Compiling...

Rosencrantz commented 2 years ago

@moovlib If you run "make web" instead of "make dev" does the build then succeed?

moovlib commented 2 years ago

it's make web.

If i run make dev :

pip install -q bump2version babel jinja2 /usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead from cryptography.utils import int_from_bytes /usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead from cryptography.utils import int_from_bytes

I have this problem only under windows I just tested in a vm ubuntu (vmware), and it works perfectly

Julm commented 2 years ago

Hi there!

Indeed, make all and make web behave identically. On a Windows Subsystem for Linux 2 (Ubuntu), as earlier.

Any proposal?

I've been working with the (docker) production server for testing. But I really would use your help on this ASAP because I need to add a new entity in the Follow the money schema and thus run in developer mode to make Aleph consider my custom release of FTM.

Going to test on Macbook Air M1.