-
|
So, at work, we have been talking to migrate from our exisitng Project / Process management tool to different alternatives. Huly came to our mind and we started experimenting with it. Later, we prepared a json. While we are aware that the documentation suggests to prepare a data directory with markdown files, we wonder why this command would give the following error. docker run --rm -it \
-e FRONT_URL="https://huly.app" \
-v "$(pwd)":/data \
hardcoreeng/import-tool:latest \
bundle.js import /data/local-ai-assistant.json \
--user "MY_EMAIL" \
--password "MY_PASSWORD" \
--workspace "MY_WORKSPACE_ID"/usr/src/app/bundle.js:109837
throw new Error(
^
Error: option creation failed due to '-pw' in option flags '-pw, --password <password>'
- a short flag is a single dash and a single character
- either use a single dash and a single character (for a short flag)
- or use a double dash for a long option (and can have two, like '--ws, --workspace')
at splitOptionFlags (/usr/src/app/bundle.js:109837:17)
at new Option (/usr/src/app/bundle.js:109564:29)
at _Command.createOption (/usr/src/app/bundle.js:110445:16)
at _Command._optionEx (/usr/src/app/bundle.js:110575:29)
at _Command.requiredOption (/usr/src/app/bundle.js:110628:21)
at importTool (/usr/src/app/bundle.js:146694:183)
at Object.<anonymous> (/usr/src/app/bundle.js:146748:1)
at Module._compile (node:internal/modules/cjs/loader:1706:14)
at Object..js (node:internal/modules/cjs/loader:1839:10)
at Module.load (node:internal/modules/cjs/loader:1441:32)
at Function._load (node:internal/modules/cjs/loader:1263:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49
Node.js v22.19.0 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Just an update, later we did create data in the required unified import format. And we were still getting this password error. Then we patched the docker image like, FROM hardcoreeng/import-tool:latest
# Remove ONLY multi-letter short flags (like -pw, -ws, -ts), keep long flags (--password, --workspace...)
RUN node -e "\
const fs=require('fs'); \
const p='/usr/src/app/bundle.js'; \
let s=fs.readFileSync(p,'utf8'); \
/* Case 1: '-pw, --password <password>' -> '--password <password>' */ \
s=s.replace(/-[a-zA-Z]{2,}\\s*,\\s*(?=--)/g,''); \
/* Case 2: '-pw --password <password>' (no comma) -> '--password <password>' */ \
s=s.replace(/-[a-zA-Z]{2,}\\s+(?=--)/g,''); \
fs.writeFileSync(p,s); \
"And we could run the import tool then. |
Beta Was this translation helpful? Give feedback.
Just an update, later we did create data in the required unified import format. And we were still getting this password error. Then we patched the docker image like,
…