Skip FOLIO Project Navigation

Users Module fail to start


#1

I have follow the Folio tutorial to deploy Users Module

I try to start the module http://localhost:3000/users

Module build failed: Error: Cannot find module '@folio\users\package.json

any idea ???


#2

I have rebuild Strips Server yarn install
out put

warning “eslint-import-resolver-webpack@0.8.3” has unmet peer dependency “eslint-plugin-import@>=1.4.0”.
warning “@folio/users@2.7.0” has incorrect peer dependency “@folio/stripes-connect@^2.2.1”.
warning “@folio/users@2.7.0” has incorrect peer dependency “@folio/stripes-core@^1.13.0”.
warning “@folio/stripes-components@0.15.0” has unmet peer dependency “stripes-core@^1.13.0”.


#3

Hello

I have follow the instruction here

  1. Running a complete FOLIO system:
    https://github.com/folio-org/ui-okapi-console/blob/master/doc/running-a-complete-system.md

  2. Set up the Okapi Users app
    http://dev.folio.org/curriculum/05_set_up_the_folio_users_app

still starting the module faill
Error: chrome debugger
Failed prop type: The prop stripes is marked as required in UsersRouting, but its value is undefined.

what can be the issue ??

Thanks


#4

Hello @issam99

Could you help me.

Look my error below

I try to start the module http://localhost:3000/users too and what happen right here??

ERROR: in module @folio/users, operation FETCH on resource ‘users’ failed, saying: NetworkError when attempting to fetch resource.


#5

Both of those documents are out-of-date. I recently added a note to that effect.


#6

Assuming you’ve completed up to 05: Set up the Okapi Users app

Ensure you have the correct package.json and stripes.config.js and they include the @folio/users dependency and module respectively.

Don’t run yarn install just yet… skip straight to “Add the Users app Okapi Module to the Okapi Gateway”

Run commands
cd $FOLIO_ROOT
git clone --recursive https://github.com/folio-org/mod-users.git

You’ll need to modify https://github.com/folio-org/mod-users/blob/master/ModuleDescriptor.json
from “id”: “mod-users-14.0.0”, to “id”: “users-module”,

If you still get build errors and really want to complete the curriculum; grab a copy of mod users from https://github.com/alvetm/folio-valatechcamp17/blob/master/folio-tutorial-working-files/mod-users.zip

This is only to complete the curriculum… unzip and run mvn install.

Now run the following in 1 terminal

cd $FOLIO_ROOT/okapi
java -Dloglevel=DEBUG -jar okapi-core/target/okapi-core-fat.jar dev

Then run the following in another terminal

curl -i -w ‘\n’ -X POST -H ‘Content-type: application/json’
-d @okapi-proxy-test-basic.json http://localhost:9130//proxy/modules
curl -i -w ‘\n’ -X POST -H ‘Content-type: application/json’
-d @okapi-deploy-test-basic.json http://localhost:9130/
/discovery/modules
curl -i -w ‘\n’ -X POST -H ‘Content-type: application/json’
-d @okapi-tenant.json http://localhost:9130//proxy/tenants
curl -i -w ‘\n’ -X POST -H ‘Content-type: application/json’
-d @okapi-enable-basic.json http://localhost:9130/
/proxy/tenants/testlib/modules
cd mod-users
curl -i -w ‘\n’ -X POST -H ‘Content-type: application/json’
-d @ModuleDescriptor.json http://localhost:9130//proxy/modules
cd mod-users
curl -i -w ‘\n’ -X POST -H ‘Content-type: application/json’
-d @DeploymentDescriptor.json http://localhost:9130/
/discovery/modules
cat > okapi-enable-users.json <<END
{
“id” : “users-module”
}
END
curl -i -w ‘\n’ -X POST -H ‘Content-type: application/json’
-d @okapi-enable-users.json http://localhost:9130/_/proxy/tenants/testlib/modules
cd …
cd stripes-tutorial-platform
yarn install
STRIPES_HOST=0.0.0.0 yarn start

Now go to http://localhost:3000

There are issues loading users via the json file and I didn’t try to fix them since mod-users is working and you can create users instead.

You will get a permissions alert when selecting a user but that’s an incentive for us to install mod-permissions.
All the best!


#7

Hello @alvet
It’s me again! Thank you for your attention with me, i just began my work with folio.

I have refined the whole process of building the server for the folio since the beginning so as not to error in this part.
I did not execute the command yarn install and start like I mentioned, but following in its steps, when I get to execute the command
curl -i -w ‘\n’ -X POST -H ‘Content-type: application/json’
-d @DeploymentDescriptor.json http://localhost:9130/_/discovery/modules

I get the following message
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Content-Length: 33

Service returned with exit code 1

In what am I failing? Because according to the folio curriculum the message should be

HTTP / 1.1 201 Created
Content-Type: application / json
Location: / _ / discovery / modules / users-module / localhost-9131
Content-Length: 245

{
“InstId”: “localhost-9131”,
“SrvcId”: “users-module”,
“NodeId”: “localhost”,
“Url”: “http: // localhost: 9131”,
“Descriptor”: {
“Exec”: “java -jar …/mod-users/target/mod-users-fat.jar -Dhttp.port =% p embed_postgres = true”
}
}

So please, help me.


#8

Hi @kelsonthony,

Off the top of my head it seems you’ve done a git clone for the user-module. It has changed since the curriculum was created and I had suggested you use [quote=“alvet, post:6, topic:948”]
You’ll need to modify https://github.com/folio-org/mod-users/blob/master/ModuleDescriptor.json
from “id”: “mod-users-14.0.0”, to “id”: “users-module”,

If you still get build errors and really want to complete the curriculum; grab a copy of mod users from https://github.com/alvetm/folio-valatechcamp17/blob/master/folio-tutorial-working-files/mod-users.zip
[/quote]

In any case I recorded the curriculum last week and its on youtube at the link below. Hope this helps.


#9

Hello @alvet
you video is awesome, but don’t using vagrant, is it required or opcional?
i’m all in virtualbox with debian.
lookk, i’m following every lesson about curriculum, but, something is not working.
see the below

T E S T S

Running org.folio.moduserstest.JarIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.646 sec - in org.folio.moduserstest.JarIT
Running org.folio.moduserstest.RestVerticleIT
[Qui ago 03 13:35:50 BRT 2017] org.folio.rest.tools.messages.Messages INFORMAÇÕES Loading messages from /infra-messages/APIMessages_en.properties …
[Qui ago 03 13:35:50 BRT 2017] org.folio.rest.tools.messages.Messages INFORMAÇÕES Loading messages from /infra-messages/APIMessages_de.properties …
Attempting to read in the module name…
[Qui ago 03 13:35:50 BRT 2017] org.folio.rest.tools.PomReader INFORMAÇÕES module name: mod_users, version: 14.1.1-SNAPSHOT
[Qui ago 03 13:35:50 BRT 2017] org.folio.rest.persist.PostgresClient INFORMAÇÕES No DB environment variables passed in, attempting to read from config file
[Qui ago 03 13:35:50 BRT 2017] org.folio.rest.persist.LoadConfs GRAVE File does not exist: /postgres-conf.json
[Qui ago 03 13:35:50 BRT 2017] org.folio.rest.persist.LoadConfs INFORMAÇÕES Resource has been loaded: /postgres-conf.json
[Qui ago 03 13:35:50 BRT 2017] org.folio.rest.persist.PostgresClient INFORMAÇÕES postgreSQLClientConfig = {“host”:“localhost”,“database”:“test_mod_users”,“password”:"…",“port”:5433,“username”:“postgres”}
[Qui ago 03 13:35:50 BRT 2017] io.vertx.ext.asyncsql.impl.PostgreSQLClientImpl INFORMAÇÕES Creating configuration for localhost:5433
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.451 sec <<< FAILURE! - in org.folio.moduserstest.RestVerticleIT
org.folio.moduserstest.RestVerticleIT Time elapsed: 1.445 sec <<< ERROR!
org.postgresql.util.PSQLException: Connection to localhost:5433 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.folio.moduserstest.RestVerticleIT.initDatabase(RestVerticleIT.java:61)
at org.folio.moduserstest.RestVerticleIT.setup(RestVerticleIT.java:81)
Caused by: java.net.ConnectException: Conexão recusada (Connection refused)
at org.folio.moduserstest.RestVerticleIT.initDatabase(RestVerticleIT.java:61)
at org.folio.moduserstest.RestVerticleIT.setup(RestVerticleIT.java:81)

Results :

Tests in error:
RestVerticleIT.setup:81->initDatabase:61 » PSQL Connection to localhost:5433 r…

Tests run: 2, Failures: 0, Errors: 1, Skipped: 0

[INFO]
[INFO] — exec-maven-plugin:1.5.0:java (stop-postgres) @ mod-users —
[INFO]
[INFO] — maven-failsafe-plugin:2.19.1:verify (verify) @ mod-users —
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:07 min
[INFO] Finished at: 2017-08-03T13:35:51-03:00
13:35:51 INFO PostgresProcess trying to stop postgresql
13:35:51 INFO Executable start AbstractPostgresConfig{storage=Storage{dbDir=/tmp/postgresql-embed-b7383612-430a-492b-9455-d9a948ab5178/db-content-19b9d594-c790-45c6-b5a2-fd0ac3e424af, dbName=‘database’, isTmpDir=true}, network=Net{host=‘localhost’, port=5433}, timeout=Timeout{startupTimeout=15000}, credentials=Credentials{username=‘postgres’, password=‘postgres’}, args=[stop], additionalInitDbParams=[]}
[INFO] Final Memory: 41M/166M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (verify) on project mod-users: There are test failures.
[ERROR]
[ERROR] Please refer to /home/folio/folio-curriculum/FOLIO_ROOT/mod-users/target/failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
root@folio /h/f/f/F/mod-users#