Coder Social home page Coder Social logo

Comments (12)

brendannee avatar brendannee commented on June 27, 2024

Try the version 1.0.1 that I just released and see if that solves the issue.

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 27, 2024

I just tried and now getting:

root@srv1:/opt/transit-arrivals-widget# npm install transit-arrivals-widget --unsafe-perm --allow-root -g
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm ERR! code 127
npm ERR! path /root/.nvm/versions/node/v16.11.1/lib/node_modules/transit-arrivals-widget/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! sh: node-pre-gyp: command not found

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-10-17T21_01_21_525Z-debug.log
root@srv1:/opt/transit-arrivals-widget# transit-arrivals-widget
transit-arrivals-widget: command not found

using:
nvm 0.39.0
npm 8.1.0
node v16.11.1

edit: switched to node 14.18.1 and it went through.

from transit-departures-widget.

brendannee avatar brendannee commented on June 27, 2024

Thanks for trying this.

The sqlite3 library in use relies on an older version of node-pre-gyp which hasn't added support for node 16 yet. I'll release a new version once all of these dependencies get updates.

The issue could actually be the version of npm - I see other people mentioning issues with npm > 6, so trying node 16 with npm 6 may work.

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 27, 2024

OK cool. I'm missing one more string to translate. Initial search box still says in english: Search by stop name or id

from transit-departures-widget.

brendannee avatar brendannee commented on June 27, 2024

Good catch. I found 3 strings missing and moved them to the template:

https://github.com/BlinkTagInc/transit-arrivals-widget/blob/master/views/widget/content/content_pl.pug#L15
"Search by stop name or id"
"all"

https://github.com/BlinkTagInc/transit-arrivals-widget/blob/master/views/widget/content/content_pl.pug#L48
"min" (abbreviation of "minutes")

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 27, 2024

OK, will translate.
Does this string need to be moved to template too ?
"To" - in the listing of upcoming arrivals, next to route number, before trip headsign ?

It is still not-stable for me, as sometimes, there's no arrivals presented for a trip that is correct (i.e. I can see it in other gtfs-rt consuming apps) but here, i need to refresh whole page to see the result.
The only issue I can see in console is (this displays in polish, so translating it to english):
Color expected but found "#null". Error processing values for 'background-color'. Declaration abandoned.
Color expected but found "#null". Error processing value for "color". Declaration abandoned.

from transit-departures-widget.

brendannee avatar brendannee commented on June 27, 2024
  • I solved the issue you found with console warnings due to routes not having colors set
  • I moved all translations into locales files within the locales folder. https://github.com/BlinkTagInc/transit-arrivals-widget/tree/master/locales - this will make it much easier to keep things in sync.
  • The config property is now called "locale" instead of "languageCode"
  • You'll see in pl.json that there are a few additional strings which need translations: "Invalid stop ID", "min", and "To {{headsign}}". If you want to add these via PR, or just reply with what they should be that would be great.

For the issue you mentioned with missing arrivals, can you send me your GTFS and GTFS-RT feed so I can troubleshoot? And an example of a stop which isn't showing up as expected? Thanks!

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 27, 2024

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 27, 2024

@brendannee see http://pksonline.pl/przyjazdy/?stop_id=POZTA02 sometimes on the first load it doesn't show any arrivals and i need to refresh the page to see something.

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 27, 2024

I tried to git pull the newest version and run transit-arrivals-widget and got this toward the end of processing:

 Generating Transit Arrivals Widget HTML
Error: views/widget/widget.pug:4
    2|   .card.mx-auto.my-5
    3|     .card-body
  > 4|       h2= __('Realtime Arrivals')
    5|       .form-group
    6|         .btn-group.btn-group-toggle(data-toggle="buttons")
    7|           label.btn.btn-primary.active

__ is not a function
[  Error: views/widget/widget.pug:4
      2|   .card.mx-auto.my-5
      3|     .card-body
    > 4|       h2= __('Realtime Arrivals')
      5|       .form-group
      6|         .btn-group.btn-group-toggle(data-toggle="buttons")
      7|           label.btn.btn-primary.active

  __ is not a function
] {
  path: 'views/widget/widget.pug'

from transit-departures-widget.

brendannee avatar brendannee commented on June 27, 2024

Thanks for sharing the link to the implementation. I'll try it at various times to see if I notice the same issue with it not showing times on first load. When that does happen, what does it show? If you notice it happening again, can you check the JS console and let me know if there are any errors logged?

As for the __ is not a function issue, make sure you run npm install after pulling the newest version - it adds the i18n library and passes the __ function to the pug template here: https://github.com/BlinkTagInc/transit-arrivals-widget/blob/master/lib/utils.js#L191

from transit-departures-widget.

wkulesza avatar wkulesza commented on June 27, 2024

When i'm selecting route, direction and then stop (that i know has arrival and departure real-time info - checking it paralell with Trransitclock deployment) there's nothing in the console and it looks empty - http://prntscr.com/1xktnfl
When i refresh page with f5, it displays departure - http://prntscr.com/1xkton2
Feed is valid, but has route colours that are not contrasting enough with route text color.

In regard to the npm - i'm using this command before issueing transit-arrivals-widget:
npm install transit-arrivals-widget --unsafe-perm --allow-root -g

Without npm install, issuing transit-arrivals-widget says: command not found

from transit-departures-widget.

Related Issues (6)

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.