HSLdevcom / HSLdevcom/digitransit-ui

Cannot provide node options and run start

Open
#2,595 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
267
Forks
145
Avg merge
1d 15h
Merged PRs (30d)
75

Description

When I run
API_URL=https://api.digitransit.fi GEOCODING_BASE_URL=https://api.digitransit.fi/geocoding/v1 OTP_URL=https://api.digitransit.fi/routing/v1/routers/finland/ yarn run start

I get module error a
node_error

As you can see I just created a simple stats.json file but it does not work

In app/server.js when the environment is not dev it looks for manifest and stats json file

if (process.env.NODE_ENV !== 'development') {
// eslint-disable-next-line global-require, import/no-unresolved
assets = require('../manifest.json');
// eslint-disable-next-line global-require, import/no-unresolved
mainAssets = require('../stats.json').entrypoints.main.assets.filter(
asset => !asset.endsWith('.map'),
);

How should we provide it?
Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in app/server.js, especially the non-development branch that requires manifest.json and stats.json, and reproduce the reported yarn run start command with the shown environment variables. Determine how these files are expected to be supplied or generated, then make the startup path work or clearly report the required setup without the module error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.