Closed sinner closed 6 years ago
Hi @sinner
The issue is that ts-node
is missing.
Please do the following first:
node_modules
folderyarn install
Please also provide your operating system and version you used.
Hi @dweber019! Thank you again for your response:
After solving that you have said, I have another error (Error: Cannot find module '/usr/src/app/migrate'), here the detail of the error:
` $npm run setup
express-typescript-boilerplate@3.0.0-rc.1 presetup /usr/src/app yarn install
yarn install v1.3.2 [1/5] Validating package.json... [2/5] Resolving packages... success Already up-to-date. Done in 0.99s.
express-typescript-boilerplate@3.0.0-rc.1 setup /usr/src/app npm start setup.db
express-typescript-boilerplate@3.0.0-rc.1 start /usr/src/app nps "setup.db"
nps is executing setup.db
: nps db.migrate && nps db.seed
nps is executing db.migrate
: nps banner.migrate && nps config && ts-node -F ./node_modules/typeorm/cli.js migrations:run
nps is executing banner.migrate
: ts-node -F ./commands/banner.ts migrate
Error: Cannot find module '/usr/src/app/migrate'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Function.Module.runMain (module.js:684:10)
at Object.nps "setup.db"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the express-typescript-boilerplate@3.0.0-rc.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-01-23T05_57_03_814Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! express-typescript-boilerplate@3.0.0-rc.1 setup: npm start setup.db
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the express-typescript-boilerplate@3.0.0-rc.1 setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-01-23T05_57_03_837Z-debug.log `
Moreover, my node version is 8.9.4 and my operating system is Mac OS High Sierra, but I'm using your docker-compose configuration.
This project doesn't work
I'm obtaining an error after executing the "npm run setup" command:
Even, I had to install nps and typeorm globally, before this error. Any glue?
My .env file is this:
` #
APPLICATION
# APP_NAME="coin-sparta-api" APP_ROUTE="http://localhost:3000" APP_ROUTE_PREFIX="/api" APP_BANNER=false
#
LOGGING
# LOG_LEVEL="warning" LOG_JSON=false LOG_OUTPUT="dev"
#
AUTHORIZATION
# AUTH_ROUTE="http://localhost:3333/tokeninfo"
#
DATABASE
# DB_TYPE="mongodb" DB_HOST=mongodb DB_PORT=27017 DB_DATABASE="coinsparta" DB_LOGGING=false
#
GraphQL
# GRAPHQL_ENABLED=true GRAPHQL_ROUTE="/graphql"
#
Swagger
# SWAGGER_ENABLED=true SWAGGER_ROUTE="/swagger" SWAGGER_FILE="api/swagger.json" SWAGGER_USERNAME="admin" SWAGGER_PASSWORD="1234"
#
Status Monitor
# MONITOR_ENABLED=true MONITOR_ROUTE="/monitor" MONITOR_USERNAME="admin" MONITOR_PASSWORD="1234" `