geostyler / geostyler-cli

BSD 2-Clause "Simplified" License
24 stars 10 forks source link

Error when running geostyler-cli for raw output #192

Closed geographika closed 2 years ago

geographika commented 2 years ago

To recreate:

npm install
npm build
npm start -- -s sld -t geostyler -o C:/Temp C:/Temp/itasca.sld

Returns the following error, as there is only a folder name for the output rather than a file with an extension:

- Starting Geostyler CLIC:\GitHub\geostyler-cli\dist\src\index.js:58
    switch (fileEnding.toLowerCase()) {
                       ^

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at getParserFromFilename (C:\GitHub\geostyler-cli\dist\src\index.js:58:24)
    at C:\GitHub\geostyler-cli\dist\src\index.js:199:67
    at Generator.next (<anonymous>)
    at C:\GitHub\geostyler-cli\dist\src\index.js:9:71
    at new Promise (<anonymous>)
    at __awaiter (C:\GitHub\geostyler-cli\dist\src\index.js:5:12)
    at main (C:\GitHub\geostyler-cli\dist\src\index.js:156:12)
    at Object.<anonymous> (C:\GitHub\geostyler-cli\dist\src\index.js:220:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
geographika commented 2 years ago

Closed with #193