Git Product home page Git Product logo

livesotope's People

Contributors

benjie avatar dependabot[bot] avatar venryx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

livesotope's Issues

"yarn dev" fails on Windows

Summary

The install steps work fine until getting to the yarn dev step.

When running it, I get errors, and the processes all close.

Steps to reproduce

Follow the install instructions on Windows.

Expected results

I expect the dev-server to launch without error.

Actual results

I get these errors on running yarn dev:

> yarn dev
yarn run v1.22.10
$ concurrently --kill-others --names pg,ra 'npm run postgraphile' 'npm run start' 'npm run random'
[pg] 'np' is not recognized as an internal or external command,
[pg] operable program or batch file.
[ra] 'run' is not recognized as an internal or external command,
[ra] operable program or batch file.
[2] 'postgraphile'' is not recognized as an internal or external command,
[2] operable program or batch file.
[3] 'np' is not recognized as an internal or external command,
[3] operable program or batch file.
[4] 'run' is not recognized as an internal or external command,
[4] operable program or batch file.
[5] 'start'' is not recognized as an internal or external command,
[5] operable program or batch file.
[6] 'np' is not recognized as an internal or external command,
[6] operable program or batch file.
[7] 'run' is not recognized as an internal or external command,
[7] operable program or batch file.
[7] run exited with code 1
--> Sending SIGTERM to other processes..
[6] np exited with code 1
--> Sending SIGTERM to other processes..
[5] start' exited with code 1
--> Sending SIGTERM to other processes..
[4] run exited with code 1
--> Sending SIGTERM to other processes..
[3] np exited with code 1
--> Sending SIGTERM to other processes..
[2] postgraphile' exited with code 1
--> Sending SIGTERM to other processes..
[ra] run exited with code 1
--> Sending SIGTERM to other processes..
[pg] np exited with code 1
--> Sending SIGTERM to other processes..
[8] 'random'' is not recognized as an internal or external command,
[8] operable program or batch file.
[8] random' exited with code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Additional context

Not needed. (I know the cause)

Possible Solution

The fix for the issue is to replace the single quotes in the "dev" command with double quotes. (The Windows command-prompt and Powershell do not recognize the single quotes as quotes, instead interpreting them as parts of commands -- you can see this from the error log, where the single-quotes are included in the postgraphile' and start' command names)

Once I replaced the single-quotes with double-quotes, the yarn dev command runs successfully:

> yarn dev
yarn run v1.22.10
$ concurrently --kill-others --names pg,ra "npm run postgraphile" "npm run start" "npm run random"
[pg]
[pg] > [email protected] postgraphile C:\Root\Apps\@V\@Modules\graphile-engine\LiveQueryBug\Attempt1
[pg] > postgraphile -c livesotope -s app_public --watch --append-plugins @graphile-contrib/pg-simplify-inflector,@graphile/subscriptions-lds --live --port 9393
[pg]
[ra]
[ra] > [email protected] start C:\Root\Apps\@V\@Modules\graphile-engine\LiveQueryBug\Attempt1
[ra] > react-scripts start
[ra]
[2]
[2] > [email protected] random C:\Root\Apps\@V\@Modules\graphile-engine\LiveQueryBug\Attempt1
[2] > nodemon random.js
[2]
[2] [nodemon] 1.19.0
[2] [nodemon] to restart at any time, enter `rs`
[2] [nodemon] watching: *.*
[2] [nodemon] starting `node random.js`
[pg]
[pg] PostGraphile v4.4.0-rc.1 server listening on port 9393 �
[pg]
[pg]   ‣ GraphQL API:         http://localhost:9393/graphql (live subscriptions enabled)
[pg]   ‣ GraphiQL GUI/IDE:    http://localhost:9393/graphiql
[pg]   ‣ Postgres connection: postgres:///livesotope (watching)
[pg]   ‣ Postgres schema(s):  app_public
[pg]   ‣ Documentation:       https://graphile.org/postgraphile/introduction/
[pg]   ‣ Join NodeSource in supporting PostGraphile development: https://graphile.org/sponsor/
[pg]
[pg] * * *
[pg]
[ra] Starting the development server...
[ra]
[ra] Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
[ra] Compiled successfully!
[ra]
[ra] You can now view livesotope in the browser.
[ra]
[ra]   Local:            http://localhost:3000/
[ra]   On Your Network:  http://192.168.114.2:3000/
[ra]
[ra] Note that the development build is not optimized.
[ra] To create a production build, use yarn build.

Random.js fails to update DB on Node v14.5.0

Summary

The "pg" module used by "random.js" is outdated; it silently fails to connect on Node v14.5.0.

Steps to reproduce

Run the "random.js" script, with Node v14.5.0; no errors will be shown, but code will fail to perform any update operations. (the awaited promise in random() simply never resolves)

Expected results

I expect to see the "ranking" cells in the "people" table update, from the execution of the timer in random.js.

Actual results

No database updates are performed. (confirmed by checking with pgAdmin)

Additional context

OS: Windows 10
PostgreSQL: 13.1
Node: 14.5.0

Possible Solution

I ran yarn add pg@latest, and afterward the random.js script began successfully updating the people table.

I found this solution (updating the pg module) from the following comment: brianc/node-postgres#2317 (comment)

The thread shows other people with the same issue, and some discussion on the source of the issue. (apparently due to an update to the Node stream module)

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.