I want to supply the name of the file containing my self description as a command line parameter.
From the index.js I see, that this is supposed to work as third parameter.
I keep the program in a unmodified subdirectory self-description-signer (created by git submodule add) - all files that I work with are outside of this git repo.
My config therefore is in ./config (outside of self-description-signer)
Current Behavior
I call this command:
❯ node self-description-signer/index.js ./participant-self-description.json
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './participant-self-description.json'
Require stack:
- /Users/volker/Huawei/Boot-X/boot-x-iac/Self Description Signing/self-description-signer/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/volker/Huawei/Boot-X/boot-x-iac/Self Description Signing/self-description-signer/index.js:10:25)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/volker/Huawei/Boot-X/boot-x-iac/Self Description Signing/self-description-signer/index.js'
]
}
and get an error.
The same with node self-description-signer/index.js participant-self-description.json
or with node self-description-signer/index.js $PWD/participant-self-description.json
Expected Behavior
I would expect my file ./participant-self-description.json to be signed.
Strangely, if I leave out the third parameter, it will sign the example in self-description-signer/config and put the output to output
Summary
I want to supply the name of the file containing my self description as a command line parameter. From the index.js I see, that this is supposed to work as third parameter.
I keep the program in a unmodified subdirectory
self-description-signer
(created bygit submodule add
) - all files that I work with are outside of this git repo.My config therefore is in ./config (outside of
self-description-signer
)Current Behavior
I call this command:
and get an error. The same with
node self-description-signer/index.js participant-self-description.json
or withnode self-description-signer/index.js $PWD/participant-self-description.json
Expected Behavior
I would expect my file
./participant-self-description.json
to be signed. Strangely, if I leave out the third parameter, it will sign the example inself-description-signer/config
and put the output tooutput
Steps to Reproduce
Enter the above commands.
Environment
Anything else