Comments (10)
I cannot reproduce this in a debian:12-slim
container.
Did you run npm install
before ? Can you post the output of npm ls
?
from berlin-gtfs-rt-server.
I cannot reproduce either. Sorry for the fuss!
from berlin-gtfs-rt-server.
Hi!
I cannot reproduce this issue using this feed.
However I can reproduce this issue using this feed.
"328363708","barssel bahnhof"
"328363695","ocholt bahnhof"
"328363694","ocholt bahnhof"
> [email protected] docs
> ./build-docs.js
node:internal/errors:496
ErrorCaptureStackTrace(err);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@derhuerst/technical-docs-cli' imported from /home/pacs/sib00/users/gtfsr_srv_fp/git/berlin-gtfs-rt-server/build-docs.js
at new NodeError (node:internal/errors:405:5)
at packageResolve (node:internal/modules/esm/resolve:916:9)
at moduleResolve (node:internal/modules/esm/resolve:973:20)
at defaultResolve (node:internal/modules/esm/resolve:1193:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:403:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:372:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:249:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:39)
at link (node:internal/modules/esm/module_job:75:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v18.19.0
I can also reproduce this issue using this feed.
"277889210","westvictorbur grundschule victorbur"
"277889213","zob"
"277889219","zob"
"277889209","suedbrookmerland moorhusen igs"
> [email protected] docs
> ./build-docs.js
node:internal/errors:496
ErrorCaptureStackTrace(err);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@derhuerst/technical-docs-cli' imported from /home/pacs/sib00/users/gtfsr_srv_fp/git/fp-gtfs-rt-server/build-docs.js
at new NodeError (node:internal/errors:405:5)
at packageResolve (node:internal/modules/esm/resolve:916:9)
at moduleResolve (node:internal/modules/esm/resolve:973:20)
at defaultResolve (node:internal/modules/esm/resolve:1193:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:403:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:372:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:249:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:39)
at link (node:internal/modules/esm/module_job:75:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v18.19.0
Can you think of a relation between this issue and GTFS sources? Might this issue be linked to the GTFS source?
Cheers!
from berlin-gtfs-rt-server.
I could also reproduce this issue now using this feed:
CREATE FUNCTION
CREATE TYPE
CREATE TABLE
ALTER TABLE
processed 53855 rows
COPY 53855
COMMIT
+++ realpath ./build.sh
++ dirname /home/pacs/sib00/users/gtfsr_srv_vbb/git/berlin-gtfs-rt-server/build.sh
+ lib=/home/pacs/sib00/users/gtfsr_srv_vbb/git/berlin-gtfs-rt-server/lib
+ NODE_ENV=production
+ node_modules/.bin/build-gtfs-match-index /home/pacs/sib00/users/gtfsr_srv_vbb/git/berlin-gtfs-rt-server/lib/hafas-info.js /home/pacs/sib00/users/gtfsr_srv_v
bb/git/berlin-gtfs-rt-server/lib/gtfs-info.js
+ psql -b
+ tee
unrecognized value "on;" for "ON_ERROR_STOP": Boolean expected
BEGIN
stops
ERROR: relation "stops_stable_ids" already exists
STATEMENT: CREATE TABLE stops_stable_ids (
stop_id TEXT NOT NULL,
FOREIGN KEY (stop_id) REFERENCES stops,
stable_id TEXT NOT NULL,
specificity INTEGER NOT NULL
);
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: COPY stops_stable_ids FROM STDIN csv;
invalid command \.
routes
trip headsigns
ERROR: syntax error at or near ""de:11000:900100007::3""
LINE 1: "de:11000:900100007::3","1:gtfs:de:11000:900100007::3","20"
^
STATEMENT: "de:11000:900100007::3","1:gtfs:de:11000:900100007::3","20"
"de:11000:900100007::3","1:oranienburger strasse:52.5250:13.3930","30"
"de:11000:900100007::3","1:oranienburger strasse:52.5250:13.3940","31"
"de:11000:900100007::3","1:oranienburger strasse:52.5250:13.3920","31"
"de:11000:900100007::3","1:oranienburger strasse:52.5260:13.3930","31"
"de:11000:900100007::3","1:oranienburger strasse:52.5240:13.3930","31"
This is the git diff
to the main branch.
$ git diff ./build.sh
diff --git a/build.sh b/build.sh
index c329ff1..c4fb304 100755
--- a/build.sh
+++ b/build.sh
@@ -10,7 +10,7 @@ wget --compression auto \
env | grep '^PG' || true
-NODE_ENV=production node_modules/.bin/gtfs-to-sql -d --trips-without-shape-id --routes-without-agency-id -- \
+NODE_ENV=production node_modules/.bin/gtfs-to-sql --schema vbb -d --trips-without-shape-id --routes-without-agency-id -- \
gtfs/agency.csv \
gtfs/calendar.csv \
gtfs/calendar_dates.csv \
@@ -20,10 +20,10 @@ NODE_ENV=production node_modules/.bin/gtfs-to-sql -d --trips-without-shape-id --
gtfs/stops.csv \
gtfs/transfers.csv \
gtfs/trips.csv \
- | sponge | psql -b
+ | tee | psql -b
# gtfs/shapes.csv \
lib="$(dirname $(realpath $0))/lib"
NODE_ENV=production node_modules/.bin/build-gtfs-match-index \
$lib/hafas-info.js $lib/gtfs-info.js \
- | sponge | psql -b
+ | tee | psql -b
from berlin-gtfs-rt-server.
BTW, I'll get a similar response when using sponge
instead of tee
. With this git diff
git diff
diff --git a/build.sh b/build.sh
index c329ff1..f283efe 100755
--- a/build.sh
+++ b/build.sh
@@ -4,13 +4,13 @@ set -e
set -o pipefail
set -x
-wget --compression auto \
- -r --no-parent --no-directories -R .csv.gz \
- -P gtfs -N 'https://vbb-gtfs.jannisr.de/latest/'
+#wget --compression auto \
+# -r --no-parent --no-directories -R .csv.gz \
+# -P gtfs -N 'https://vbb-gtfs.jannisr.de/latest/'
env | grep '^PG' || true
-NODE_ENV=production node_modules/.bin/gtfs-to-sql -d --trips-without-shape-id --routes-without-agency-id -- \
+NODE_ENV=production node_modules/.bin/gtfs-to-sql -d --schema gtfs_via_psql_mblthk --trips-without-shape-id --routes-without-agency-id -- \
gtfs/agency.csv \
gtfs/calendar.csv \
gtfs/calendar_dates.csv \
@@ -20,7 +20,7 @@ NODE_ENV=production node_modules/.bin/gtfs-to-sql -d --trips-without-shape-id --
gtfs/stops.csv \
gtfs/transfers.csv \
gtfs/trips.csv \
- | sponge | psql -b
+ | sponge | psql -b > npm-run-build-mblthk.txt 2>&1
# gtfs/shapes.csv \
lib="$(dirname $(realpath $0))/lib"
$ cat npm-run-build-mblthk.txt:
NOTICE: extension "postgis" already exists, skipping
CREATE EXTENSION
CREATE SCHEMA
BEGIN
CREATE FUNCTION
DO
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE TYPE
CREATE TABLE
COPY 3186
CREATE TYPE
CREATE TABLE
COPY 91995
CREATE INDEX
CREATE INDEX
SELECT 270377
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE TYPE
CREATE TABLE
COPY 2942
CREATE INDEX
CREATE TYPE
CREATE TYPE
CREATE TABLE
COPY 215056
CREATE TYPE
CREATE TABLE
COPY 0
CREATE INDEX
CREATE INDEX
CREATE TABLE
COPY 123
CREATE TYPE
CREATE TYPE
CREATE TABLE
COPY 33224
ALTER TABLE
CREATE INDEX
CREATE TYPE
CREATE TYPE
CREATE TABLE
COPY 4697358
CREATE INDEX
CREATE INDEX
UPDATE 4697358
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE INDEX
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE VIEW
CREATE FUNCTION
CREATE VIEW
CREATE FUNCTION
CREATE TYPE
CREATE TABLE
ALTER TABLE
COPY 30072
COMMIT
from berlin-gtfs-rt-server.
[email protected] docs ./build-docs.js node:internal/errors:496 ErrorCaptureStackTrace(err); ^ Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@derhuerst/technical-docs-cli' imported from /home/pacs/sib00/users/gtfsr_srv_fp/git/berlin-gtfs-rt-server/build-docs.js […] Node.js v18.19.0
This error is very likely unrelated to the GTFS feed used!
I just means that Node.js couldn't find the dependency @derhuerst/technical-docs-cli
. Just to confirm: You did run npm install
before, not npm install --production
/npm install --omit=dev
, and didn't run it with NODE_ENV=production
? See the npm install
docs for details.
You can post the output of npm ls
here to help me find out if you actually installed all necessary dependencies.
from berlin-gtfs-rt-server.
I could also reproduce this issue now using this feed:
[…] BEGIN stops ERROR: relation "stops_stable_ids" already exists STATEMENT: CREATE TABLE stops_stable_ids ( stop_id TEXT NOT NULL, FOREIGN KEY (stop_id) REFERENCES stops, stable_id TEXT NOT NULL, specificity INTEGER NOT NULL ); ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: COPY stops_stable_ids FROM STDIN csv; invalid command \. routes trip headsigns ERROR: syntax error at or near ""de:11000:900100007::3"" LINE 1: "de:11000:900100007::3","1:gtfs:de:11000:900100007::3","20" ^ […]
This is not related to @derhuerst/technical-docs-cli
. It seems like you merely tried to import a 2nd time into an already populated DB.
from berlin-gtfs-rt-server.
BTW, I'll get a similar response when using
sponge
instead oftee
. With thisgit diff
[…][…] BEGIN […] COMMIT
This run was different: It seems to have succeeded. The DB import – Technically it's just the 1. step, importing the GTFS as-is using gtfs-via-postgres
's gtfs-to-sql
CLI. You didn't post the output of the 2. step, building a matching index using match-gtfs-rt-to-gtfs
's build-gtfs-match-index
. – runs in one big transaction, so as soon as you see the COMMIT
, it has succeeded.
from berlin-gtfs-rt-server.
I just means that Node.js couldn't find the dependency
@derhuerst/technical-docs-cli
. Just to confirm: You did runnpm install
before, notnpm install --production
/npm install --omit=dev
, and didn't run it withNODE_ENV=production
? See thenpm install
docs for details.
Why shall I call npm install
when the readme says npm install --production
? Just kidding! ;-)
Anyways, I can replicate this repository when I am calling the following instruction set.
npm i
npm run build
./start
I am appreciating your help very much! Cheers!
from berlin-gtfs-rt-server.
Why shall I call
npm install
when the readme saysnpm install --production
? Just kidding! ;-)
Indeed, this is wrong. I will fix it.
from berlin-gtfs-rt-server.
Related Issues (8)
- correct content-type?
- Question: Do I realy need to provide the GTFS Schedule feed at 2 places? HOT 2
- Question: Is there a checklist how to adjust this repository to a different GTFS Schedule feed & Hafas client? HOT 4
- use station DHIDs from HAFAS for matching
- npm run build fails: sponge missing HOT 5
- Observation: unrecognized value "on;" for "ON_ERROR_STOP": Boolean expected HOT 1
- allow importing into a custom DB schema HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from berlin-gtfs-rt-server.