Hello and good morning,
is it possible to use the new map client in conjunction with an own instance of ORS?
Thanks!
Hello and good morning,
is it possible to use the new map client in conjunction with an own instance of ORS?
Thanks!
yes, you can either set the endpoints in the advanced settings to point to your local instance or hardcode it if you want to set up the new client yourself
Thank you, I’ll give it a try!
Hey guys,
I get the following errors, when I run npm run dev
:
npm run dev
ors-maps-client@0.8.0 dev /opt/ors-map-client
webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
/opt/ors-map-client/config.js:20
export default config
^^^^^^
SyntaxError: Unexpected token ‘export’
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/opt/ors-map-client/build/utils.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ors-maps-client@0.8.0 dev:webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ors-maps-client@0.8.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It does not metter if I use the provided config-example and just rename it to config.js and copy it to the root folder or if I use a custom config.js.
The error is related to export default config
, which is the last row of config.js.
The log isn’t really helpful either:
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’, ‘/usr/local/bin/npm’, ‘run’, ‘dev’ ]
2 info using npm@6.14.9
3 info using node@v12.20.0
4 verbose run-script [ ‘predev’, ‘dev’, ‘postdev’ ]
5 info lifecycle ors-maps-client@0.8.0~predev: ors-maps-client@0.8.0
6 info lifecycle ors-maps-client@0.8.0~dev: ors-maps-client@0.8.0
7 verbose lifecycle ors-maps-client@0.8.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle ors-maps-client@0.8.0~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/ors-map-client/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle ors-maps-client@0.8.0~dev: CWD: /opt/ors-map-client
10 silly lifecycle ors-maps-client@0.8.0~dev: Args: [
10 silly lifecycle ‘-c’,
10 silly lifecycle ‘webpack-dev-server --inline --progress --config build/webpack.dev.conf.js’
10 silly lifecycle ]
11 silly lifecycle ors-maps-client@0.8.0~dev: Returned: code: 1 signal: null
12 info lifecycle ors-maps-client@0.8.0~dev: Failed to exec dev script
13 verbose stack Error: ors-maps-client@0.8.0 dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1022:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid ors-maps-client@0.8.0
15 verbose cwd /opt/ors-map-client
16 verbose Linux 4.19.0-11-amd64
17 verbose argv “/usr/bin/node” “/usr/local/bin/npm” “run” “dev”
18 verbose node v12.20.0
19 verbose npm v6.14.9
20 error code ELIFECYCLE
21 error errno 1
22 error ors-maps-client@0.8.0 dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
22 error Exit status 1
23 error Failed at the ors-maps-client@0.8.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
root@ors:/opt/ors-map-client#
Someone any idea, what might be the problem?
Bye and thank you very much,
Katzentier
Hi @Katzentier,
did the npm install
command run successfully before?
You can try to remove your node_modules
folder and npm install
again.
Maybe @amoncaldas can have a look at it.
You can also create an issue in the source repo.
Best regards
Hi @Katzentier
Could you please provide more information like:
Also, as Amandus said, you have the option to use the public client linked to your local installation, by defining the endpoints in the map client advanced settings.
Thanks
Hey ho,
thanks for coming back to me!
The public client is not an option because my long-term intention is to build an offline instance of ORS which works without internet connection (in the context of disaster relief). SO the goal is that all components will be running in a local network.
Here the information you asked for:
OS: Debian 4.19.146-1 (2020-09-17) x86_64 GNU/Linux (Debian 10)
Nodejs-Version: v12.20.0
NPM Version: 6.14.9
NPM Install before: as far as I remember, the npm install ran successfully, npm run dev not.
Followed steps of readme: As far as I know, yes. At least I read it several times and double-checked.
I will try to delete the node_modules folder and run npm install and npm run dev again. If that fails, I will give it another try and start completely over again…
Deleting the modules folder leads to the same result:
/opt/ors-map-client# npm install
phantomjs-prebuilt@2.1.16 install /opt/ors-map-client/node_modules/phantomjs-prebuilt
node install.js
PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /opt/ors-map-client/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1607969829911/phantomjs-2.1.1-linux-x86_64 → /opt/ors-map-client/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /opt/ors-map-client/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
chromedriver@2.46.0 install /opt/ors-map-client/node_modules/chromedriver
node install.js
Current existing ChromeDriver binary is unavailable, proceding with download and extraction.
Downloading from file: https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip
Saving to file: /opt/ors-map-client/node_modules/chromedriver/2.46/chromedriver/chromedriver_linux64.zip
Received 781K…
Received 1568K…
Received 2352K…
Received 3136K…
Received 3920K…
Received 4704K…
Received 5277K total.
Extracting zip contents
Copying to target path /opt/ors-map-client/node_modules/chromedriver/lib/chromedriver
Fixing file permissions
Done. ChromeDriver binary available at /opt/ors-map-client/node_modules/chromedriver/lib/chromedriver/chromedriver
node-sass@4.14.1 install /opt/ors-map-client/node_modules/node-sass
node scripts/install.js
Cached binary found at /root/.npm/node-sass/4.14.1/linux-x64-72_binding.node
core-js@2.6.11 postinstall /opt/ors-map-client/node_modules/core-js
node -e “try{require(‘./postinstall’)}catch(e){}”
Thank you for using core-js ( GitHub - zloirock/core-js: Standard Library ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
https://opencollective.com/core-js
Denis Pushkarev | creating core-js | Patreon
Also, the author of core-js ( zloirock (Denis Pushkarev) · GitHub ) is looking for a good job -)
ejs@2.7.4 postinstall /opt/ors-map-client/node_modules/ejs
node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
node-sass@4.14.1 postinstall /opt/ors-map-client/node_modules/node-sass
node scripts/build.js
Binary found at /opt/ors-map-client/node_modules/node-sass/vendor/linux-x64-72/binding.node
Testing binary
Binary is fine
sinon@4.5.0 postinstall /opt/ors-map-client/node_modules/sinon
node scripts/support-sinon.js
Have some for Sinon? You can support the project via Open Collective:
Contribute - Open Collective
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/mocha/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/karma/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
added 2094 packages from 2573 contributors and audited 2106 packages in 97.961s
69 packages are looking for funding
runnpm fund
for details
found 7 vulnerabilities (3 low, 1 moderate, 3 high)
runnpm audit fix
to fix them, ornpm audit
for details
npm run dev
ors-maps-client@0.8.0 dev /opt/ors-map-client
webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
/opt/ors-map-client/config.js:20
export default config
^^^^^^
SyntaxError: Unexpected token ‘export’
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/opt/ors-map-client/build/utils.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ors-maps-client@0.8.0 dev:webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ors-maps-client@0.8.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-12-14T18_18_05_515Z-debug.log
just for completion could you maybe also append the “complete log” from /root/.npm/_logs/2020-12-14T18_18_05_515Z-debug.log
This seems to be an ES6 Syntax issue… webpack is trying to load it as a common js module
Here is the output:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'dev' ]
2 info using npm@6.14.9
3 info using node@v12.20.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle ors-maps-client@0.8.0~predev: ors-maps-client@0.8.0
6 info lifecycle ors-maps-client@0.8.0~dev: ors-maps-client@0.8.0
7 verbose lifecycle ors-maps-client@0.8.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle ors-maps-client@0.8.0~dev: PATH: /usr/local/lib/node_modules /npm/node_modules/npm-lifecycle/node-gyp-bin:/opt/ors-map-client/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle ors-maps-client@0.8.0~dev: CWD: /opt/ors-map-client
10 silly lifecycle ors-maps-client@0.8.0~dev: Args: [
10 silly lifecycle '-c',
10 silly lifecycle 'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js'
10 silly lifecycle ]
11 silly lifecycle ors-maps-client@0.8.0~dev: Returned: code: 1 signal: null
12 info lifecycle ors-maps-client@0.8.0~dev: Failed to exec dev script
13 verbose stack Error: ors-maps-client@0.8.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1022:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid ors-maps-client@0.8.0
15 verbose cwd /opt/ors-map-client
16 verbose Linux 4.19.0-11-amd64
17 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "dev"
18 verbose node v12.20.0
19 verbose npm v6.14.9
20 error code ELIFECYCLE
21 error errno 1
22 error ors-maps-client@0.8.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
22 error Exit status 1
23 error Failed at the ors-maps-client@0.8.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
ES6 seems to be javascript-related…
Did you came across this error with the ORS Map Client before or am I the first reporting it?
I did some web research and found out there is some kind of webpack config (config.js). Should I try changing this config?
@Katzentier,
normally you shouldn’t have to change the config if it doesn’t say so in the README.md
Maybe @amoncaldas has an opinion on the logs
Hey @Katzentier
I had a look in your logs but I could see no info that helped me to understand clearly what is happening. Even when searching for error code ELIFECYCLE I was not able to be sure about what could be causing the error. But i do think that it is about environment.
After your complain, I created a fresh local repo by cloning and from github, and just by following the instructions in the readme I was able to run the app locally.
We have run this app on Ubuntu and Mac. The version of my current node and npm are:
npm 6.14.6
node v12.18.3
There is a small difference from yours, but this should not be the problem, since I already run this app with several versions. But your versions are a bit newer then mines. Maybe you could try with the exact ones I’m using now. If you have the possibility to test it on Ubuntu it could possibly help us to determine where exactly is the problem. I also found the discussion below. Maybe it can help:
Sorry for not being able to identify the problem. If you try the suggestions above and get different results, then let us know.
Kind regards,
Hey,
thank you for your efforts.
I’ll give it a try on an Ubuntu OS tomorrow.
Thanks,
Katzentier.
I’m using macOS and it has been months since i’ve installed the new client.
But i think you wanted to know from @amoncaldas anyway
I go it to work finally.
That is good news @Katzentier ! I’m nor sure if you got the latest version. Now you can customize/extend/modify the map client using configuration options and plugins.
Thanks for the hint, I’ll give it a try