Apparently, this is a known problem with webpack
<https://github.com/webpack/webpack/issues/8082>. The cure is to upgrade
webpack-cli.
Try the following steps. Note that in the following we are changing the
required version in the file weert-js/client/package.json (which is for the
client). Do not confuse it with the similarly named weert-js/package.json
(which is for the server).
1. Remove the old installation.
*cd weert-js/client*
*rm -rf node_modules*
2. Delete the file weert-js/client/package-lock.json
3. Edit the file weert-js/client/package.json so the highlighted line reads
"webpack": "^4.17.2",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-cli": "^3.1.2",
"webpack-merge": "^4.1.4"
4. Install and build again
*cd weert-js/client*
*npm install*
*npm run build*
If that doesn't work, we'll have to figure something else out.
-tk
On Wed, Nov 14, 2018 at 6:47 AM Maarten van der Hoeven <[email protected]>
wrote:
> Thanks. The cryptic error message came from the npm-debug.log. Below the
> messages I see on screen.
>
> No .bin directory is created. So, nothing there.
>
> At 'npm install' I only see a couple of warnings.
> At 'npm run build' I see a 'TypeError' on property of 'properties' of
> undefined.
>
> /home/maarten/git/weert-js/client# ls -las
> total 456
> 4 drwxr-xr-x 6 root root 4096 Nov 13 19:18 .
> 4 drwxr-xr-x 10 root root 4096 Nov 13 16:20 ..
> 4 -rw-r--r-- 1 root root 236 Nov 13 16:20 .babelrc
> 4 drwxr-xr-x 2 root root 4096 Nov 13 16:20 config
> 4 -rw-r--r-- 1 root root 91 Nov 13 18:40 error.txt
> 40 drwxr-xr-x 849 root root 36864 Nov 13 18:29 node_modules
> 4 -rw-r--r-- 1 root root 2696 Nov 13 19:18 npm-debug.log
> 4 -rw-r--r-- 1 root root 1726 Nov 13 16:20 package.json
> 372 -rw-r--r-- 1 root root 379098 Nov 13 16:20 package-lock.json
> 4 drwxr-xr-x 5 root root 4096 Nov 13 16:20 src
> 4 -rw-r--r-- 1 root root 2923 Nov 13 16:20 state.md
> 4 drwxr-xr-x 3 root root 4096 Nov 13 18:40 v8-compile-cache-0
> 4 -rw-r--r-- 1 root root 1480 Nov 13 16:20 webpack.config.js
>
> /home/maarten/git/weert-js/client# npm install
> npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
> npm WARN notsup Not compatible with your operating system or architecture:
> [email protected]
> npm WARN [email protected] requires a peer of ajv@^6.0.0 but none was
> installed.
> npm WARN [email protected] No repository field.
> npm WARN [email protected] No license field.
>
> /home/maarten/git/weert-js/client# npm run build
> > [email protected] build /home/maarten/git/weert-js/client
> > webpack --mode production
>
> /home/maarten/git/weert-js/client/node_modules/webpack-cli/bin/config-yargs.js:89
> describe:
> optionsSchema.definitions.output.properties.path.description,
>
> ^
> TypeError: Cannot read property 'properties' of undefined
> at module.exports
> (/home/maarten/git/weert-js/client/node_modules/webpack-cli/bin/config-yargs.js:89:48)
> at
> /home/maarten/git/weert-js/client/node_modules/webpack-cli/bin/webpack.js:60:27
> at Object.<anonymous>
> (/home/maarten/git/weert-js/client/node_modules/webpack-cli/bin/webpack.js:515:3)
> at Module._compile (module.js:652:30)
> at Object.Module._extensions..js (module.js:663:10)
> at Module.load (module.js:565:32)
> at tryModuleLoad (module.js:505:12)
> at Function.Module._load (module.js:497:3)
> at Module.require (module.js:596:17)
> at require (internal/module.js:11:18)
> npm ERR! Linux 4.15.0-38-generic
> npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
> npm ERR! node v8.10.0
> npm ERR! npm v3.5.2
> npm ERR! code ELIFECYCLE
> npm ERR! [email protected] build: `webpack --mode production`
> npm ERR! Exit status 1
> npm ERR!
> npm ERR! Failed at the [email protected] build script 'webpack --mode
> production'.
> npm ERR! Make sure you have the latest version of node.js and npm
> installed.
> npm ERR! If you do, this is most likely a problem with the weert-client
> package,
> npm ERR! not with npm itself.
> npm ERR! Tell the author that this fails on your system:
> npm ERR! webpack --mode production
> npm ERR! You can get information on how to open an issue for this project
> with:
> npm ERR! npm bugs weert-client
> npm ERR! Or if that isn't available, you can get their info via:
> npm ERR! npm owner ls weert-client
> npm ERR! There is likely additional logging output above.
> npm ERR! Please include the following file with any support request:
> npm ERR! /home/maarten/git/weert-js/client/npm-debug.log
>
>
> Op woensdag 14 november 2018 02:53:51 UTC+1 schreef Tom Keffer:
>>
>> That's a pretty cryptic error message. Doesn't tell us much of anything.
>>
>> I wonder if webpack was installed? Take a look in /
>> home/maarten/git/weert-js/client/node_modules/.bin and see if there is a
>> link to webpack. Mine looks like:
>>
>> *ls -al weert-js/client/node_modules/.bin*
>> total 40
>> drwxrwxr-x 2 tkeffer tkeffer 4096 Sep 8 06:21 ./
>> drwxrwxr-x 846 tkeffer tkeffer 36864 Sep 8 06:21 ../
>> lrwxrwxrwx 1 tkeffer tkeffer 18 Jul 1 10:04 acorn ->
>> ../acorn/bin/acorn*
>> lrwxrwxrwx 1 tkeffer tkeffer 19 Jul 1 10:00 atob ->
>> ../atob/bin/atob.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 25 Jul 1 10:00 babylon ->
>> ../babylon/bin/babylon.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 22 Jul 1 10:04 browserslist ->
>> ../browserslist/cli.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 20 Jul 1 10:09 cssesc ->
>> ../cssesc/bin/cssesc*
>> lrwxrwxrwx 1 tkeffer tkeffer 16 Jul 1 10:09 csso ->
>> ../csso/bin/csso*
>> lrwxrwxrwx 1 tkeffer tkeffer 22 Jul 1 10:04 envinfo ->
>> ../envinfo/dist/cli.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 15 Jul 1 10:00 errno ->
>> ../errno/cli.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 25 Jul 1 10:00 esparse ->
>> ../esprima/bin/esparse.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 28 Jul 1 10:00 esvalidate ->
>> ../esprima/bin/esvalidate.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 24 Jul 1 10:00 glob-all ->
>> ../glob-all/bin/glob-all*
>> lrwxrwxrwx 1 tkeffer tkeffer 12 Jul 1 10:00 he -> ../he/bin/he*
>> lrwxrwxrwx 1 tkeffer tkeffer 23 Jul 1 10:00 html-minifier ->
>> ../html-minifier/cli.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 31 Jul 1 10:00 import-local-fixture ->
>> ../import-local/fixtures/cli.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 33 Jul 1 10:04 jscodeshift ->
>> ../jscodeshift/bin/jscodeshift.sh*
>> lrwxrwxrwx 1 tkeffer tkeffer 18 Jul 1 10:00 jsesc ->
>> ../jsesc/bin/jsesc*
>> lrwxrwxrwx 1 tkeffer tkeffer 19 Jul 1 10:00 json5 ->
>> ../json5/lib/cli.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 25 Jul 1 10:09 js-yaml ->
>> ../js-yaml/bin/js-yaml.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 22 Jul 1 10:00 loose-envify ->
>> ../loose-envify/cli.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 32 Jul 1 10:00 miller-rabin ->
>> ../miller-rabin/bin/miller-rabin*
>> lrwxrwxrwx 1 tkeffer tkeffer 14 Jul 1 10:00 mime -> ../mime/cli.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 20 Jul 1 10:00 mkdirp ->
>> ../mkdirp/bin/cmd.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 19 Jul 1 10:00 opener ->
>> ../opener/opener.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 27 Jul 1 10:04 prettier ->
>> ../prettier/bin-prettier.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 25 Jul 1 10:00 regjsparser ->
>> ../regjsparser/bin/parser*
>> lrwxrwxrwx 1 tkeffer tkeffer 16 Jul 1 10:00 rimraf ->
>> ../rimraf/bin.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 20 Jul 1 10:00 semver ->
>> ../semver/bin/semver*
>> lrwxrwxrwx 1 tkeffer tkeffer 16 Jul 1 10:00 sha.js ->
>> ../sha.js/bin.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 19 Jul 1 10:04 shjs ->
>> ../shelljs/bin/shjs*
>> lrwxrwxrwx 1 tkeffer tkeffer 16 Jul 1 10:09 svgo ->
>> ../svgo/bin/svgo*
>> lrwxrwxrwx 1 tkeffer tkeffer 25 Jul 1 10:00 uglifyjs ->
>> ../uglify-es/bin/uglifyjs*
>> lrwxrwxrwx 1 tkeffer tkeffer 25 Sep 8 06:21 webpack ->
>> ../webpack/bin/webpack.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 46 Jul 1 10:04 webpack-bundle-analyzer
>> -> ../webpack-bundle-analyzer/lib/bin/analyzer.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 29 Jul 1 10:04 webpack-cli ->
>> ../webpack-cli/bin/webpack.js*
>> lrwxrwxrwx 1 tkeffer tkeffer 18 Jul 1 10:04 which ->
>> ../which/bin/which*
>>
>> -tk
>>
>> On Tue, Nov 13, 2018 at 9:49 AM Maarten van der Hoeven <[email protected]>
>> wrote:
>>
>>> Hi Tom,
>>>
>>> You were right, the build failed. Must have been overlooked when I was
>>> fetching some coffee. I started all over again, and watched it clolsely.
>>> Regarding the client, the setp 'npm install' succeeded (toook some long
>>> time). However, 'npm run build' failed. See track stace below. npm is at
>>> version 3.5.2, nodejs is at version 8.10. Running Ubuntu 18.04 LTS, 64 bit
>>>
>>>
>>> 0 info it worked if it ends with ok
>>> 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
>>> 2 info using [email protected]
>>> 3 info using [email protected]
>>> 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
>>> 5 info lifecycle [email protected]~prebuild: [email protected]
>>> 6 silly lifecycle [email protected]~prebuild: no script for prebuild,
>>> continuing
>>> 7 info lifecycle [email protected]~build: [email protected]
>>> 8 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle
>>> true
>>> 9 verbose lifecycle [email protected]~build: PATH:
>>> /usr/share/npm/bin/node-gyp-bin:/home/maarten/git/weert-js/client/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
>>> 10 verbose lifecycle [email protected]~build: CWD:
>>> /home/maarten/git/weert-js/client
>>> 11 silly lifecycle [email protected]~build: Args: [ '-c', 'webpack
>>> --mode production' ]
>>> 12 silly lifecycle [email protected]~build: Returned: code: 1 signal:
>>> null
>>> 13 info lifecycle [email protected]~build: Failed to exec build script
>>> 14 verbose stack Error: [email protected] build: `webpack --mode
>>> production`
>>> 14 verbose stack Exit status 1
>>> 14 verbose stack at EventEmitter.<anonymous>
>>> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
>>> 14 verbose stack at emitTwo (events.js:126:13)
>>> 14 verbose stack at EventEmitter.emit (events.js:214:7)
>>> 14 verbose stack at ChildProcess.<anonymous>
>>> (/usr/share/npm/lib/utils/spawn.js:24:14)
>>> 14 verbose stack at emitTwo (events.js:126:13)
>>> 14 verbose stack at ChildProcess.emit (events.js:214:7)
>>> 14 verbose stack at maybeClose (internal/child_process.js:925:16)
>>> 14 verbose stack at Process.ChildProcess._handle.onexit
>>> (internal/child_process.js:209:5)
>>> 15 verbose pkgid [email protected]
>>> 16 verbose cwd /home/maarten/git/weert-js/client
>>> 17 error Linux 4.15.0-38-generic
>>> 18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
>>> 19 error node v8.10.0
>>> 20 error npm v3.5.2
>>> 21 error code ELIFECYCLE
>>> 22 error [email protected] build: `webpack --mode production`
>>> 22 error Exit status 1
>>> 23 error Failed at the [email protected] build script 'webpack --mode
>>> production'.
>>> 23 error Make sure you have the latest version of node.js and npm
>>> installed.
>>> 23 error If you do, this is most likely a problem with the weert-client
>>> package,
>>> 23 error not with npm itself.
>>> 23 error Tell the author that this fails on your system:
>>> 23 error webpack --mode production
>>> 23 error You can get information on how to open an issue for this
>>> project with:
>>> 23 error npm bugs weert-client
>>> 23 error Or if that isn't available, you can get their info via:
>>> 23 error npm owner ls weert-client
>>> 23 error There is likely additional logging output above.
>>> 24 verbose exit [ 1, true ]
>>>
>>>
>>>
>>>
>>> Op dinsdag 13 november 2018 15:20:14 UTC+1 schreef Tom Keffer:
>>>>
>>>> I suspect that either you did not build the client, or you had an error
>>>> while building it. Take a look in the directory weert-js/client/dist and
>>>> make sure it includes files index.html and and main.js. Both are created as
>>>> part of the build process. For instructions on building the client, see the
>>>> section Building and running the client
>>>> <https://github.com/tkeffer/weert-js#building-and-running-the-client> in
>>>> the README.
>>>>
>>>> -tk
>>>>
>>>> On Tue, Nov 13, 2018 at 5:12 AM Maarten van der Hoeven <
>>>> [email protected]> wrote:
>>>>
>>>>> Sorry, not completed my message. I am quite experienced at Linux, so I
>>>>> understand the pointers to look into.
>>>>>
>>>>> This one (http://localhost:3000/api/v1/measurements/wxpackets/packets)
>>>>> gives (all valid data):
>>>>>
>>>>>
>>>>> [{"tags":{"platform":"default_platform","stream":"default_stream"},"fields":{"altimeter_pressure":1019.5373185962048,"console_voltage":3.83,"dewpoint_temperature":8.515007214898198,"extra1_temperature":11.666666666666666,"gauge_pressure":1019.3588138825883,"heatindex_temperature":11.666666666666666,"in_humidity_percent":58,"in_temperature":21.5,"out_humidity_percent":81,"out_temperature":11.666666666666666,"radiation_radiation":308,"rain_rain":0,"sealevel_pressure":1019.8446579091847,"unit_system":16,"uv_uv":0.8,"wind_dir":234,"wind_speed":22.530872000139194,"windchill_temperature":11.666666666666666,"x_wind_speed":-18.22785834619927,"y_wind_speed":-13.243314282971237},"timestamp":1542106655000},{"tags":{"platform":"default_platform","stream":"default_stream"},"fields":{"altimeter_pressure":1019.5373185962048,"console_voltage":3.83,"dewpoint_temperature":8.515007214898198,"extra1_temperature":11.666666666666666,"gauge_pressure":1019.3588138825883,"heatindex_temperature":11.666666666666666,"in_humidity_percent":58,"in_temperature":21.5,"out_humidity_percent":81,"out_temperature":11.666666666666666,"radiation_radiation":308,"rain_rain":0,"sealevel_pressure":1019.8446579091847,"unit_system":16,"uv_uv":0.8,"wind_dir":246,"wind_speed":25.749568000159073,"windchill_temperature":11.666666666666666,"x_wind_speed":-23.523400882804587,"y_wind_speed":-10.473292849036753},"timestamp":1542106657000},{"tags":{"platform":"default_platform","stream":"default_stream"},"fields":
>>>>>
>>>>>
>>>>>
>>>>> Op dinsdag 13 november 2018 13:51:06 UTC+1 schreef Maarten van der
>>>>> Hoeven:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I've taken notice of the remark about a steep learning curve.
>>>>>> However, I've installed all according to the manual, and I see data
>>>>>> posted
>>>>>> (trail of ndm with posted data every second or so) and data populated
>>>>>> into
>>>>>> the influx database.
>>>>>>
>>>>>> However, when I access the webpage (http://localhost:3000) I got:
>>>>>>
>>>>>> WeeRT server Page not found: / Status: 404
>>>>>>
>>>>>> Error: Page not found: /
>>>>>> at /home/maarten/git/weert-js/server/server.js:107:17
>>>>>> at Layer.handle [as handle_request]
>>>>>> (/home/maarten/git/weert-js/node_modules/express/lib/router/layer.js:95:5)
>>>>>> at trim_prefix
>>>>>> (/home/maarten/git/weert-js/node_modules/express/lib/router/index.js:317:13)
>>>>>> at
>>>>>> /home/maarten/git/weert-js/node_modules/express/lib/router/index.js:284:7
>>>>>> at Function.process_params
>>>>>> (/home/maarten/git/weert-js/node_modules/express/lib/router/index.js:335:12)
>>>>>> at next
>>>>>> (/home/maarten/git/weert-js/node_modules/express/lib/router/index.js:275:10)
>>>>>> at SendStream.error
>>>>>> (/home/maarten/git/weert-js/node_modules/serve-static/index.js:121:7)
>>>>>> at emitOne (events.js:116:13)
>>>>>> at SendStream.emit (events.js:211:7)
>>>>>> at SendStream.error
>>>>>> (/home/maarten/git/weert-js/node_modules/send/index.js:270:17)
>>>>>>
>>>>>>
>>>>>>
>>>>>> What would be a logical place to look into to?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Op donderdag 5 april 2018 23:46:22 UTC+2 schreef Tom Keffer:
>>>>>>>
>>>>>>> This is something I've been fiddling with for quite a while: a
>>>>>>> realtime display for weeWX.
>>>>>>>
>>>>>>> Live demo
>>>>>>> <http://ec2-52-11-251-72.us-west-2.compute.amazonaws.com:3000/>.
>>>>>>>
>>>>>>> Github repository <https://github.com/tkeffer/weert-js>.
>>>>>>>
>>>>>>> It consists of a Node server running Express, an InfluxDB database,
>>>>>>> and a React client that uses Redux for state management.
>>>>>>>
>>>>>>> Please, please, please: do not attempt to install and get running
>>>>>>> unless you are very experienced with Linux and, preferably, Javascript,
>>>>>>> Node, InfluxDB, and npm. Expect a very steep learning curve. I would
>>>>>>> love
>>>>>>> contributions, but I simply do not have the time for any hand holding.
>>>>>>>
>>>>>>> Cheers,
>>>>>>>
>>>>>>> -tk
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>