MapStore2 build environment on Windows 10

228 views
Skip to first unread message

Mats Elfström

unread,
Sep 20, 2021, 5:56:39 AM9/20/21
to mapstore-developers
Hi!
Hoping for some response to this one.
I am struggling with the build environment for MapStore2. 
For a new start, I made a new clone of the repository, and reinstalled node.js and npm (14.17.6 and 6.14.15). On the first run of npm install, I get pages like this.
Running NPM install to update dependencies
Mon Sep 20 11:20:59 2021
npm WARN deprecated mkd...@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated redux-devtool...@1.3.0: Package moved to @redux-devtools/log-monitor.
npm WARN deprecated redux-d...@3.4.0: Package moved to @redux-devtools/core.
npm WARN deprecated redux-devtool...@1.1.2: Package moved to @redux-devtools/dock-monitor.
npm WARN deprecated @carnesen/redux-add-action-...@0.0.1: This project has been abandoned
npm WARN deprecated @mapbox/geojs...@2.0.1: Please make plans to check GeoJSON in some other way
npm WARN deprecated @turf/ins...@4.1.0: Module has been renamed to @turf/boolean-point-in-polygon
npm WARN deprecated ax...@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated @turf/polygon-to...@4.1.0: Module has been renamed to @turf/polygon-to-line
npm WARN deprecated @turf/point-on...@4.1.0: Module has been renamed to @turf/point-on-feature
npm WARN deprecated draft-js-inline...@3.0.1: use @draft-js-plugins/inline-toolbar >=v4 instead
npm WARN deprecated draft-js-pl...@2.1.1: use @draft-js-plugins/editor >=v4 instead
npm WARN deprecated draft-js-side-...@3.0.1: use @draft-js-plugins/side-toolbar >=v4 instead
npm WARN deprecated json-...@2.1.2: Please upgrade to the latest version 3.x.x module for improved functionality.
npm WARN deprecated uu...@3.0.1: 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 turf...@3.0.10: Turf packages are now namespaced: please use @turf/bbox instead
npm WARN deprecated turf-...@3.0.10: Turf packages are now namespaced: please use @turf/buffer instead
npm WARN deprecated turf-in...@3.0.10: Turf packages are now namespaced: please use @turf/intersect instead
npm WARN deprecated xml...@0.3.0: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated turf-...@3.0.10: Turf packages are now namespaced: please use @turf/union instead
npm WARN deprecated turf-point...@3.0.10: Turf packages are now namespaced: please use @turf/point-on-surface instead
npm WARN deprecated v...@4.21.0: Please consider using https://github.com/visjs
npm WARN deprecated de...@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated chok...@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated redux-devtoo...@1.10.0: Package moved to @redux-devtools/instrument.
npm WARN deprecated xml...@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated @carnesen/che...@0.0.1: Obsoleted by TypeScript
npm WARN deprecated cor...@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated @turf/ins...@4.7.3: Module has been renamed to @turf/boolean-point-in-polygon
npm WARN deprecated draft-js...@2.0.2: use @draft-js-plugins/buttons >=v4 instead
npm WARN deprecated xml...@0.2.1: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated cor...@2.3.0: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated doc-...@1.2.0: critical issue fixed in 2.3.0
npm WARN deprecated intl-rela...@1.3.0: This package has been deprecated, please see migration guide at 'https://github.com/formatjs/formatjs/tree/master/packages/intl-relativeformat#migration-guide'
npm WARN deprecated cor...@2.4.1: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated query...@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated turf...@3.0.12: Turf packages are now namespaced: please use @turf/meta instead
npm WARN deprecated turf-c...@3.0.12: Turf packages are now namespaced: please use @turf/combine instead
npm WARN deprecated geojson-...@0.0.0: This module is now under the @mapbox namespace: install @mapbox/geojson-normalize instead
npm WARN deprecated turf-h...@3.0.12: Turf packages are now namespaced: please use @turf/helpers instead
npm WARN deprecated turf-e...@3.0.12: Turf packages are now namespaced: please use @turf/explode instead
npm WARN deprecated turf-...@3.0.12: Turf packages are now namespaced: please use @turf/inside instead
npm WARN deprecated turf-...@3.0.12: Turf packages are now namespaced: please use @turf/center instead
npm WARN deprecated turf-d...@3.0.12: Turf packages are now namespaced: please use @turf/distance instead
npm WARN deprecated uu...@3.4.0: 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 req...@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated de...@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated chok...@1.5.2: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated req...@2.81.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated fsev...@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated nom...@1.8.1: Package no longer supported. Contact sup...@npmjs.com for more info.
... continues for some lines  ...
What is going on here? Can I really trust any result after this barrage of warnings? Who has the authority to amend and update all the deprecated components?
Needless to say, the build subsequently fails, due to not passed npm tests which have to be commented out from the build script.
FAILED TESTS:
  Test locale related actions
    × loads an existing translation file
      Chrome Headless 93.0.4577.82 (Windows 10)
    Error: Expected 'LOCALE_LOAD_ERROR' to be 'CHANGE_LOCALE'
        at assert (webpack://mapstore2/./node_modules/expect/lib/assert.js?:29:9)
        at Expectation.toBe (webpack://mapstore2/./node_modules/expect/lib/Expectation.js?:70:28)
        at eval (webpack://mapstore2/./web/client/actions/__tests__/locale-test.js?:146:63)
        at eval (webpack://mapstore2/./web/client/actions/locale.js?:1236:9)
        at lib$es6$promise$$internal$$tryCatch (webpack://mapstore2/./node_modules/es6-promise/dist/es6-promise.js?:332:16)
        at lib$es6$promise$$internal$$invokeCallback (webpack://mapstore2/./node_modules/es6-promise/dist/es6-promise.js?:344:17)
        at lib$es6$promise$$internal$$publish (webpack://mapstore2/./node_modules/es6-promise/dist/es6-promise.js?:315:11)
        at MutationObserver.lib$es6$promise$asap$$flush (webpack://mapstore2/./node_modules/es6-promise/dist/es6-promise.js?:126:9)

I am not too happy about the situation, since I want to build a stable environment for MapStore development and production.
Pleas respond, anyone competent enough to contribute.

Regards, Mats.E 


Matteo Velludini

unread,
Sep 20, 2021, 6:43:28 AM9/20/21
to mapstore-...@googlegroups.com
Hi Mats,

for the warnings during installation you can ignore it for now
Anyway we have some issues opened for them

For the build problem it can be related to your current setup of the project
Is this https://github.com/matself/MapStore2  your repository?
Is this one that is having problems?


--
You received this message because you are subscribed to the Google Groups "mapstore-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-develo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mapstore-developers/c2d0eae3-9eab-408e-908b-0c541d1906fcn%40googlegroups.com.


--

Regards,

Matteo Velludini

==

GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

==

Matteo Velludini

Frontend Software Engineer


GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  333 8128928


https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Mats Elfström

unread,
Sep 20, 2021, 7:37:39 AM9/20/21
to mapstore-developers
Yes. That is a fork I made today from a clone I made today.
In a virgin node/npm environment I made today, version numbers above.
I have changed nothing in the project setup.
I have had this exact compilation error for several months.
I have no reason to believe that it is a setup error. But I may of course be wrong.
In that case, I would be happy to be advised how to correct it. I already know that something is wrong.
These two lines should tell anyone who knows this code what to change.
at eval (webpack://mapstore2/./web/client/actions/__tests__/locale-test.js?:146:63)
at eval (webpack://mapstore2/./web/client/actions/locale.js?:1236:9)

Note though that any local changes in my clone/fork needs to be reverted in order for me to maintain the language file.

Regards, Mats.E

Matteo Velludini

unread,
Sep 20, 2021, 8:06:45 AM9/20/21
to mapstore-...@googlegroups.com
I have downloaded your fork repo  and run ./build.sh with tests included and for me the build is working correctly.

so I don't get why you have these errors, unless you have some local changes that you have not pushed.



Mats Elfström

unread,
Sep 20, 2021, 3:53:01 PM9/20/21
to mapstore-developers
Hi!
The failing section of the locale-test.js file is probably the second one of the three sections copied below. It appears to me that that section is missing a string argument (line 152 on GitHub). But that does not explain how it can pass in another environment.
On the other hand, one would expect these tests to be general, and not environment dependent. Because if they are, the passed tests would not necessarily be valid in another environment. Which kind of defies the purpose of testing in the first place.

MapStore2/web/client/actions/__tests__/locale-test.js
...line 139 and onwards 
    it('loads an existing translation file', (done) => {
        loadLocale('base/web/client/test-resources', 'it-IT')((e) => {
            try {
                expect(e).toExist();
                expect(e.type).toBe('CHANGE_LOCALE');
                done();
            } catch (ex) {
                done(ex);
            }
        });
    });

    it('loads an existing translation file', (done) => {
        loadLocale('base/web/client/test-resources')((e) => {
            try {
                expect(e).toExist();
                expect(e.type).toBe('CHANGE_LOCALE');
                done();
            } catch (ex) {
                done(ex);
            }
        });
    });

    it('loads an existing broken translation file', (done) => {
        loadLocale('base/web/client/test-resources', 'it-IT-broken')((e) => {
            try {
                expect(e).toExist();
                expect(e.type).toBe('LOCALE_LOAD_ERROR');
                done();
            } catch (ex) {
                done(ex);
            }
        });
    });

Reply all
Reply to author
Forward
0 new messages