geosolutions-it / mapstore-project Goto Github PK
View Code? Open in Web Editor NEWScripts to manage MapStore projects
License: Other
Scripts to manage MapStore projects
License: Other
Hi,
trying to set up a customized mapstore for Geonode I thought I might be able to keep it DRY by using this with the geonode
type. The following tells me I might be chasing a dead end:
master
as a valid dependency version in package.json!)standard
is listed in the READMEIf geonode
project type is not maintained, please remove the dead code. And would be wonderful to document how to properly customize a current mapstore with current geonode. Happy to help!
Cheers,
Christian
We should centralize common paths in a single file to improve maintainability
eg: appDirectory, mapStorePath, frameworkPath, projectPath, ...
Creating a project and linking MapStore (with file:<path-to-mapstore>
or with npm link
) I have the following error running npm start. Customized a little, but I don't think it is the problem.
I have this problem on linux.
Build Entries:
- Apps: {
"js/mapstore": "./js/apps/mapstore.jsx"
}
- HTML: {
"index.html": "./html/index.ejs"
}
- Themes: {
"themes/default": "./themes/default/theme.less"
}
9% setup compilation LoaderOptionsPlugin[webpack-cli] TypeError: The 'compilation' argument must be an instance of Compilation
at Function.getCompilationHooks (/home/offtherailz/work/projects/MapStore2/node_modules/webpack/lib/NormalModule.js:171:10)
at /home/offtherailz/work/projects/MapStore2/node_modules/webpack/lib/LoaderOptionsPlugin.js:43:17
at Hook.eval [as call] (eval at create (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:198:1)
at Hook.CALL_DELEGATE [as _call] (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Compiler.js:943:26)
at /home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Compiler.js:984:29
at Hook.eval [as callAsync] (eval at create (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Compiler.js:979:28)
at /home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Watching.js:112:19
at Hook.eval [as callAsync] (eval at create (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:34:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
at run (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Watching.js:66:33)
at Watching._go (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Watching.js:123:4)
at /home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Watching.js:57:9
at Compiler.readRecords (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Compiler.js:821:11)
at new Watching (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Watching.js:54:17)
at Compiler.watch (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack/lib/Compiler.js:362:19)
at wdm (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack-dev-middleware/index.js:41:33)
at Server.setupDevMiddleware (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack-dev-server/lib/Server.js:207:23)
at new Server (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/webpack-dev-server/lib/Server.js:118:10)
at Object.startDevServer [as default] (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/@webpack-cli/serve/lib/startDevServer.js:92:24)
child_process.js:679
throw err;
^
Error: Command failed: /home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/.bin/webpack serve --progress --color --port 8081 --hot --inline --config /home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/@mapstore/project/types/standard/config/webpack.config.js
at checkExecSyncError (child_process.js:640:11)
at Object.execSync (child_process.js:676:15)
at Object.<anonymous> (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/@mapstore/project/scripts/start.js:23:6)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
status: 2,
signal: null,
output: [ null, null, null ],
pid: 192292,
stdout: null,
stderr: null
}
child_process.js:679
throw err;
^
Error: Command failed: node /home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/@mapstore/project/scripts/start.js --type=standard
at checkExecSyncError (child_process.js:640:11)
at Object.execSync (child_process.js:676:15)
at Object.<anonymous> (/home/offtherailz/work/projects/emsa/emsa-cgd-fe/node_modules/@mapstore/project/bin/mapstore-project.js:28:10)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 192284,
stdout: null,
stderr: null
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `mapstore-project start standard`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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! /home/offtherailz/.npm/_logs/2021-06-09T15_07_49_729Z-debug.log
Caused by a duplication of webpack instances, solving is not trivial.
c105-cgd works using 6.14.13 , doesn't work using npm 6.14.15
"dependencies": {
"mapstore": "git+https://github.com/geosolutions-it/MapStore2.git#c105-cgd",
"leaflet-rotatedmarker": "0.2.0",
"react-checkbox-tree": "^1.7.1"
},
Tested by @sycured on CI servers.
Need to check if it is a regression of npm or a change of API.
notified by @sycured
Running a mapstore-project
's buid.sh
in a directory with "spaces" in absolute path.
nvm install 14 && nvm use 14
cd mapstore/cgd-fe && ./build.sh
has the following error.
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module '/var/lib/jenkins/workspace/EMSA'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
child_process.js:866
throw err;
^
Error: Command failed: node /var/lib/jenkins/workspace/EMSA CGD MAPSTORE WAR/mapstore/cgd-fe/node_modules/@mapstore/project/scripts/compile.js --type=standard
at checkExecSyncError (child_process.js:790:11)
at Object.execSync (child_process.js:863:15)
at Object.<anonymous> (/var/lib/jenkins/workspace/EMSA CGD MAPSTORE WAR/mapstore/cgd-fe/node_modules/@mapstore/project/bin/mapstore-project.js:28:10)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 38343,
stdout: null,
stderr: null
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] compile: `mapstore-project compile standard`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] compile 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! /var/lib/jenkins/.npm/_logs/2021-10-08T11_53_05_459Z-debug.log
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE
The issue is due to whitespace in folder name
When creating entries, to avoid cache issues, by default, where not specified in a different way, we should use cache.
In html template instead, we could use something like html-webpack-injector-plugin to simplify the injection of the correct entry (chunk), automatically using the correct (hashed) file-name
I should instead ask to specify the file-name in config, if one specific name is required.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.