Open landryb opened 2 years ago
tested with node 12.16.1
and npm 6.13.4
==> OK
nvm install 12.16.1
git clone --recursive https://github.com/georchestra/mapstore2-cadastrapp
cd mapstore2-cadastrapp
npm install
npm run ext:build
============
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
assets/img/node_modules/leaflet-extra-markers/dist/img/markers_default@2x0e04541b6ebe474c81733ab05f85b891.png (248 KiB)
index.js (429 KiB)
assets/js/289.19783918.js (574 KiB)
assets/js/275.59bd00e2.js (639 KiB)
assets/js/469.ab5abcec.js (283 KiB)
assets/js/965.283b8a30.js (3.81 MiB)
assets/js/86.e7a40fb5.js (1.49 MiB)
assets/js/985.983c8d9e.js (2.19 MiB)
assets/js/807.8c45f492.js (368 KiB)
assets/js/455.c2f7427b.js (361 KiB)
Cadastrapp.zip (2.91 MiB)
webpack 5.9.0 compiled with 3 warnings in 102501 ms
npm 6.14.16, nodejs 12.22.12-deb-1nodesource1 - and exact same failure after removing both node_modules subdirs.
[22/06 07:45] landry@build.fluela:/data/src/georchestra/mapstore2-cadastrapp $rm -Rf node_modules MapStore2/node_modules
[22/06 07:45] landry@build.fluela:/data/src/georchestra/mapstore2-cadastrapp $npm install && npm run ext:build
....
ERROR in ./MapStore2/web/client/components/map/cesium/Map.jsx 65:0-26
Module not found: Error: Can't resolve '/data/src/georchestra/mapstore2-cadastrapp/node_modules/cesium/Build/Cesium/Widgets/widgets.css' in '/data/src/georchestra/mapstore2-cadastrapp/MapStore2/web/client/components/map/cesium'
@ ./MapStore2/web/client/components/map/plugins/cesium.js
@ ./MapStore2/web/client/components/map/plugins/ lazy ^\.\/.*\.js$ chunkName: map-library-[request] namespace object ./cesium.js
@ ./MapStore2/web/client/components/map/enhancers/mapType.js 93:10-95:48
@ ./MapStore2/web/client/components/widgets/widget/MapView.jsx 13:0-50 18:93-100
@ ./js/extension/components/landedproperty/MapView.jsx 9:0-66 27:27-34
@ ./js/extension/components/landedproperty/Content.jsx 8:0-32 55:38-45
@ ./js/extension/components/landedproperty/Modal.jsx 27:0-32 181:38-45
@ ./js/extension/plugins/cadastrapp/LandedProperty.jsx 23:0-83 69:42-72
@ ./js/extension/plugins/cadastrapp/Main.jsx 11:0-46 52:194-208
@ ./js/extension/plugins/Extension.jsx 6:0-37 49:13-17
@ container entry
ERROR in ./js/extension/plugins/cadastrapp/Main.jsx 14:0-61
Module not found: Error: Can't resolve 'react-container-dimensions' in '/data/src/georchestra/mapstore2-cadastrapp/js/extension/plugins/cadastrapp'
@ ./js/extension/plugins/Extension.jsx 6:0-37 49:13-17
@ container entry
webpack 5.9.0 compiled with 2 errors in 266291 ms
i still have no node_modules/cesium
subdir, but i have Mapstore2/node_modules/cesium
. same thing for react-container-dimension
, absent in node_modules
but present in Mapstore2/node_modules
.
i copied those over:
[22/06 07:54] landry@build.fluela:/data/src/georchestra/mapstore2-cadastrapp $cp -r MapStore2/node_modules/cesium node_modules
[22/06 07:55] landry@build.fluela:/data/src/georchestra/mapstore2-cadastrapp $cp -r MapStore2/node_modules/react-container-dimensions node_modules/
noted that they're removed if i rerun npm install
, recopied them again.
and with that it finally built:
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
assets/img/node_modules/leaflet-extra-markers/dist/img/markers_default@2x0e04541b6ebe474c81733ab05f85b891.png (248 KiB)
index.js (429 KiB)
assets/js/289.f0adc163.js (568 KiB)
assets/js/275.173f60bc.js (639 KiB)
assets/js/469.72d63229.js (282 KiB)
assets/js/913.454ab2b8.js (7.46 MiB)
assets/js/412.0121675f.js (1.54 MiB)
assets/js/985.cd57ea10.js (2.19 MiB)
assets/js/807.8eef8b70.js (368 KiB)
Cadastrapp.zip (3.86 MiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
Cadastrapp (429 KiB)
index.js
webpack 5.9.0 compiled with 2 warnings in 264076 ms
so from my understanding, some dependencies in the toplevel node_modules
dir arent installed, and they're not found via the node_modules/mapstore2 symlink.
lrwxrwxrwx 1 landry users 12 Jun 22 07:47 node_modules/mapstore2 -> ../MapStore2
Hello, @landryb
after removing both node_modules subdirs.
Maybe the problem is on the package-lock.json try to remove it aswell with node_modules, and try again
yes, it's fine after removing package-lock.json
. Maybe npm install should regenerate it ? or the docs should mention in the build docs that one should remove it after each git pull ? since it's in .gitignore ppl who are not nodejs developers might not know about it.
npm doc explain :
package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json
https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json
But from my experiences, i need to destroy him if i change github ref (e.g change branch) to be sur to build last dependancies.
the docs should mention in the build docs that one should remove it after each git pull
True for me
following the regular 'npm install && npm run ext:build` steps, building master fails here:
i've tried
npm install
in the Mapstore2 submodule but that doesnt help.i dont have a
node_modules/cesium/
subdir in the toplevelnode_modules
folder.