-
Dear all, I'm currently unable to setup a local development environment for uwazi: I get the similar errors as reported in #2576 and discussion 5321. $ git clone https://github.com/huridocs/uwazi.git
$ cd uwazi
$ podman-compose up --build
$ yarn install
$ yarn blank-state ⇒ Sanitizing connections...
2023-09-19T09:39:39.757Z [uwazi_development] uncaughtException: Cannot destructure property 'languages' of 'settings' as it is null.
TypeError: Cannot destructure property 'languages' of 'settings' as it is null.
at Object.up (/home/tombreit/build/uwazi/app/api/migrations/migrations/6-connections_sanitizing/index.js:14:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at /home/tombreit/build/uwazi/app/api/migrations/migrate.ts:22:18
at runMigration (/home/tombreit/build/uwazi/app/api/migrations/migrate.ts:21:3)
[Tenant error] Error: Accessing nonexistent async context Complete yarn blank-state logs└─ $ ▶ yarn blank-state
yarn run v1.22.19
$ ./database/blank_state.sh
Deleting uwazi_development database on 127.0.0.1
./database/blank_state.sh: Zeile 12: mongosh: Kommando nicht gefunden.
./database/blank_state.sh: Zeile 13: mongorestore: Kommando nicht gefunden.
$ node --no-experimental-fetch scripts/run.js ../scripts/migrate.js
entities_override_mongo_language...
sanitize_empty_geolocations...
fullText_to_per_page...
pdf_thumbnails...
geolocation_fields...
Sanitizing connections...
2023-09-19T09:39:39.757Z [uwazi_development] uncaughtException: Cannot destructure property 'languages' of 'settings' as it is null.
TypeError: Cannot destructure property 'languages' of 'settings' as it is null.
at Object.up (/home/tombreit/build/uwazi/app/api/migrations/migrations/6-connections_sanitizing/index.js:14:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at /home/tombreit/build/uwazi/app/api/migrations/migrate.ts:22:18
at runMigration (/home/tombreit/build/uwazi/app/api/migrations/migrate.ts:21:3)
[Tenant error] Error: Accessing nonexistent async context
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ node --no-experimental-fetch scripts/run.js ../database/reindex_elastic.js
Deleting index uwazi_development...
The index was not found:
{
"name": "FetchResponseError",
"json": {
"error": {
"root_cause": [
{
"type": "index_not_found_exception",
"reason": "no such index [uwazi_development]",
"resource.type": "index_or_alias",
"resource.id": "uwazi_development",
"index_uuid": "_na_",
"index": "uwazi_development"
}
],
"type": "index_not_found_exception",
"reason": "no such index [uwazi_development]",
"resource.type": "index_or_alias",
"resource.id": "uwazi_development",
"index_uuid": "_na_",
"index": "uwazi_development"
},
"status": 404
},
"status": 404,
"headers": {},
"endpoint": {
"method": "DELETE",
"url": "http://localhost:9200/uwazi_development"
}
}
Moving on.
[done]
Creating index uwazi_development...
- Base properties mapping
- Custom templates mapping
[done]
Tweaking index settings for reindex performance... [done]
Starting reindex...
Indexing documents and entities... - 0 indexed
Restoring index settings... [done]
Done, took 1.177 seconds
Done in 9.92s. I'm using All infrastructure dependencies seem to run correctly: └─ $ ▶ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
22589c8b5d11 localhost/uwazi_elasticsearch:latest eswrapper 22 minutes ago Up 22 minutes 0.0.0.0:9200->9200/tcp uwazi-elasticsearch
47d04cb91be3 docker.io/library/mongo:4.2 mongod --replSet ... 22 minutes ago Up 22 minutes 0.0.0.0:27017->27017/tcp uwazi-mongo
2db864b7964e docker.io/library/redis:5.0.14 redis-server 22 minutes ago Up 22 minutes 0.0.0.0:6379->6379/tcp uwazi-redis
1bad11961b57 docker.io/minio/minio:latest server /data --co... 22 minutes ago Up 22 minutes 0.0.0.0:9000-9001->9000-9001/tcp uwazi-s3
And Complete yarn hot logs(uwazi-venv) user@host ~/build/uwazi (development)
└─ $ ▶ yarn hot
yarn run v1.22.19
$ export HOT=true; export BABEL_ENV=debug; yarn run watch-types & yarn tailwind-watch & yarn run dev-server & yarn run webpack-server
$ tsc --noEmit --pretty --watch --preserveWatchOutput
$ yarn run tailwind --watch
$ ./node_modules/.bin/nodemon --no-experimental-fetch ./server.js --ignore 'app/dist/*' --watch 'app/api' --watch 'app/shared' --ext 'ts js tsx'
$ node --no-experimental-fetch ./webpack/webpack.server.js
$ npx tailwindcss -i ./app/react/App/styles/main.css -o ./app/react/App/styles/globals.css --watch
[nodemon] 2.0.22
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): app/api/**/* app/shared/**/*
[nodemon] watching extensions: ts,js,tsx
[nodemon] starting `node --no-experimental-fetch ./server.js`
[11:40:08] Starting compilation in watch mode...
clean-webpack-plugin: options.output.path not defined. Plugin disabled...
==> Connecting to mongodb://localhost/
==> Your database needs to be migrated, please run:
yarn migrate & yarn reindex
[nodemon] app crashed - waiting for file changes before starting...
webpack built 4d3cc38ac658233620fb in 19250ms
WARNING in ./app/react/App/scss/styles.scss (./app/react/App/scss/styles.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./app/react/App/scss/styles.scss)
Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($hub-size, 2) or calc($hub-size / 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
app/react/App/scss/modules/_relationships.scss 331:20 @import
app/react/App/scss/styles.scss 72:9 root stylesheet
WARNING in ./app/react/App/scss/styles.scss (./app/react/App/scss/styles.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./app/react/App/scss/styles.scss)
Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($hub-size, 2) or calc($hub-size / 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
app/react/App/scss/modules/_relationships.scss 432:20 @import
app/react/App/scss/styles.scss 72:9 root stylesheet
WARNING in ./app/react/App/scss/styles.scss (./app/react/App/scss/styles.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./app/react/App/scss/styles.scss)
Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($switcher-height, 2) or calc($switcher-height / 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
app/react/App/scss/modules/_search.scss 460:18 @import
app/react/App/scss/styles.scss 44:9 root stylesheet
WARNING in ./app/react/App/scss/styles.scss (./app/react/App/scss/styles.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./app/react/App/scss/styles.scss)
Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(28px - $hub-size, 2) or calc((28px - $hub-size) / 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
app/react/App/scss/modules/_relationships.scss 330:10 @import
app/react/App/scss/styles.scss 72:9 root stylesheet
WARNING in ./node_modules/react-widgets/lib/scss/react-widgets.scss (./node_modules/react-widgets/lib/scss/react-widgets.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./node_modules/react-widgets/lib/scss/react-widgets.scss)
Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($input-height, 2) or calc($input-height / 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
node_modules/react-widgets/lib/scss/number-picker.scss 3:16 @import
node_modules/react-widgets/lib/scss/react-widgets.scss 11:9 root stylesheet
webpack compiled with 5 warnings
[11:40:33] Found 0 errors. Watching for file changes. ⇒ I've expected the development server starts and serves http://localhost:8080/ Have I forgotten anything? I appreciate any tips on how to get my development environment up and running. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I missed/ignored/overlooked the two lines ./database/blank_state.sh: Zeile 12: mongosh: Command not found.
./database/blank_state.sh: Zeile 13: mongorestore: Command not found. After manually installing ==> 🌎 Listening on port 3000. Open up http://localhost:3000/ in your browser.
==> 📦 webpack is watching...
██╗ ██╗██╗ ██╗ █████╗ ███████╗██╗
██║ ██║██║ ██║██╔══██╗╚══███╔╝██║
██║ ██║██║ █╗ ██║███████║ ███╔╝ ██║
██║ ██║██║███╗██║██╔══██║ ███╔╝ ██║
╚██████╔╝╚███╔███╔╝██║ ██║███████╗██║
╚═════╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚══════╝╚═╝ |
Beta Was this translation helpful? Give feedback.
I missed/ignored/overlooked the two lines
After manually installing
mongosh
andmongorestore
(I found no reference in the development setup docs about that) UWAZI boots: