Giter Club home page Giter Club logo

dito-example's People

Contributors

lehni avatar puckey avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dito-example's Issues

unable to login to admin panel

When I run dito-example using:

yarn add current-script-polyfill // (see https://github.com/ditojs/dito-example/issues/12)
yarn install
yarn db:reset && yarn db:seed
yarn dev

And then login at the admin page at http://0.0.0.0:8080/admin/

It redirects to an empty page with the Dummies button on the side. When I press on it, I am redirected to another login screen.. When I login again, again I am redirected to the same login screen and I see the following error in the console:

TypeError: Cannot create property 'name' on boolean 'true'
    at eval (dito-admin.umd.min.js:1)
    at tryCatch (runtime.js:45)
    at Generator.invoke [as _invoke] (runtime.js:274)
    at Generator.prototype.<computed> [as next] (runtime.js:97)
    at n (dito-admin.umd.min.js:1)
    at s (dito-admin.umd.min.js:1)
    at eval (dito-admin.umd.min.js:1)
    at new Promise (<anonymous>)
    at eval (dito-admin.umd.min.js:1)
    at ne (dito-admin.umd.min.js:1) undefined

hello example action broken

The hello action in the front/dummies controller is expecting an instance of the Dummy model as its first argument:

    @action('get')
    @parameters({
      name: 'msg',
      type: 'string',
      required: true
    })
    @returns({
      name: 'greeting',
      type: 'string'
    })
    hello(dummy, msg) {
      return `Hello ${dummy.fullName}: ${msg}`
    }

But instead it receives the koa context as its first argument, causing this.fullName to be undefined.

http://0.0.0.0:8080/api/front/dummies/1/hello?msg=Just+saying+hello

ControllerError: Controller LinetoAdminController: Missing config field.

When running yarn dev it fails with the following error:

yarn run v1.7.0
$ nodemon --watch src/server --watch src/config --exec 'yarn start'
[nodemon] 1.17.5
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /Users/synch/dev/dito-example/src/server/**/* /Users/synch/dev/dito-example/src/config/**/*
[nodemon] starting `yarn start`
$ babel-node src/server
/Users/synch/dev/dito-example/node_modules/@ditojs/server/lib/controllers/AdminController.js:37
      throw new _errors.ControllerError(this, 'Missing config field.');
      ^

ControllerError: Controller LinetoAdminController: Missing config field.
    at LinetoAdminController.compose (/Users/synch/dev/dito-example/node_modules/@ditojs/server/src/controllers/AdminController.js:17:13)
    at Application.addController (/Users/synch/dev/dito-example/node_modules/@ditojs/server/src/app/Application.js:216:35)
    at Application.addControllers (/Users/synch/dev/dito-example/node_modules/@ditojs/server/src/app/Application.js:198:14)
    at new Application (/Users/synch/dev/dito-example/node_modules/@ditojs/server/src/app/Application.js:62:12)
    at Object.<anonymous> (/Users/synch/dev/dito-example/src/server/app.js:9:13)
    at Module._compile (module.js:649:30)
    at Module._compile (/Users/synch/dev/dito-example/node_modules/pirates/lib/index.js:91:24)
    at Module._extensions..js (module.js:660:10)
    at Object.newLoader [as .js] (/Users/synch/dev/dito-example/node_modules/pirates/lib/index.js:96:7)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Module.require (module.js:593:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/synch/dev/dito-example/src/server/index.js:1:1)
    at Module._compile (module.js:649:30)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[nodemon] app crashed - waiting for file changes before starting...

yarn console command exits with error

When I run yarn console, the command exits with error code 1:

$ dito console src/server/app
development server started at http://0.0.0.0:8080
ℹ 「hot」: WebSocket Server Listening on localhost:57517
ℹ 「hot」: Applying DefinePlugin:__hotClientOptions__
ℹ 「hot」: webpack: Compiling...

------------------------------------------------------------
Dito Console

Available references:
 - Dito app: app
 - Dito models: Message, Dummy, User

------------------------------------------------------------

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

missing current-script-polyfill dependency

When I do yarn install, I get the following error:

This dependency was not found:

* current-script-polyfill in ./node_modules/@ditojs/admin/dist/dito-admin.umd.min.js, ./node_modules/@ditojs/ui/dist/dito-ui.umd.min.js

Full output below:

●  yarn install
yarn install v1.12.3
warning ../../package.json: No license field
info No lockfile found.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
warning @ditojs/server > koa-webpack > @hapi/[email protected]: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning @ditojs/server > @vue/cli-plugin-babel > @vue/cli-shared-utils > @hapi/[email protected]: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning @ditojs/server > @vue/cli-service > webpack-dev-server > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning @ditojs/server > @vue/cli-plugin-babel > @vue/cli-shared-utils > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @ditojs/server > koa-webpack > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @ditojs/server > koa-webpack > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @ditojs/server > koa-webpack > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @ditojs/server > koa-webpack > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @ditojs/server > koa-webpack > @hapi/joi > @hapi/topo > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
warning @ditojs/server > @vue/cli-service > webpack-dev-server > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning @ditojs/server > @vue/cli-plugin-babel > @vue/cli-shared-utils > request > [email protected]: this library is no longer supported
warning @ditojs/server > @vue/cli-plugin-babel > webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning @ditojs/server > @vue/cli-plugin-babel > webpack > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning @ditojs/server > @vue/cli-plugin-babel > webpack > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning sqlite3 > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @babel/cli > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning " > @ditojs/[email protected]" has incorrect peer dependency "knex@^0.20.0".
warning "@ditojs/server > [email protected]" has unmet peer dependency "webpack@>=2".
warning "@ditojs/server > [email protected]" has unmet peer dependency "webpack@^4.28.0".
warning "@ditojs/server > @vue/cli-plugin-eslint > [email protected]" has incorrect peer dependency "eslint@>=1.6.0 <7.0.0".
warning "@ditojs/server > koa-webpack > [email protected]" has unmet peer dependency "webpack@^4.0.0".
warning "@ditojs/server > koa-webpack > [email protected]" has unmet peer dependency "webpack@^4.0.0".
warning "@ditojs/server > @ditojs/admin > tiptap-extensions > [email protected]" has incorrect peer dependency "prosemirror-tables@^0.9.1".
warning "@ditojs/server > koa-webpack > webpack-hot-client > @webpack-contrib/[email protected]" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
warning " > [email protected]" has unmet peer dependency "mssql@^6.2.0".
warning " > [email protected]" has unmet peer dependency "mysql@^2.18.1".
warning " > [email protected]" has unmet peer dependency "mysql2@^2.1.0".
warning " > [email protected]" has unmet peer dependency "pg@^8.0.3".
warning " > [email protected]" has incorrect peer dependency "sqlite3@^4.1.1".
warning " > [email protected]" has unmet peer dependency "[email protected]".
[5/5] 📃  Building fresh packages...
success Saved lockfile.
$ yarn clean && yarn build
yarn run v1.12.3
warning ../../package.json: No license field
$ rimraf dist
✨  Done in 0.19s.
yarn run v1.12.3
warning ../../package.json: No license field
$ yarn run build:src && yarn run build:admin
warning ../../package.json: No license field
$ babel src -d dist --copy-files --source-maps inline
Successfully compiled 27 files with Babel (741ms).
warning ../../package.json: No license field
$ cross-env NODE_ENV=production vue-cli-service build src/admin/index.js --dest dist/admin

⠇  Building for production...

 ERROR  Failed to compile with 2 errors                                                                               9:37:12 PM

This dependency was not found:

* current-script-polyfill in ./node_modules/@ditojs/admin/dist/dito-admin.umd.min.js, ./node_modules/@ditojs/ui/dist/dito-ui.umd.min.js

To install it, you can run: npm install --save current-script-polyfill
 ERROR  Build failed with errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.