Self-hosted API: InvalidAsn1Error on npm start
See original GitHub issueI’m trying to test a self-hosted version of Staticman.
I followed the instructions on the README:
- created a
config.development.json
based on the sample - added my GitHub Personal Access Token
- added my SSH
but when I run npm start
:
InvalidAsn1Error: Expected 0x2: got 0x0
Is there anything I missed?
(PS. there are 5 high severity issues in the dependencies, mostly about mailgun
and github
)
Issue Analytics
- State:
- Created 5 years ago
- Comments:28 (11 by maintainers)
Top Results From Across the Web
Self hosting the APIM Developer portal: Unable to publish ...
Getting below error on running "npm run publish" command. Error: (node:12516) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment ...
Read more >addons-linter - npm
Start using addons-linter in your project by running `npm i ... metadata: false, output: 'none', boring: false, selfHosted: false, ...
Read more >start-server-and-test - npm
This command is meant to be used with NPM script commands. If you have a "start server", and "test" script names for example,...
Read more >npm-start - npm Docs
This runs a predefined command specified in the "start" property of a package's "scripts" object. If the "scripts" object does not define a...
Read more >scripts | npm Docs
Since npm@1.1.71 , the npm CLI has run the prepublish script for both npm publish and npm install , because it's a convenient...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s my post of my experience setting up my own Staticman instance: https://www.gabescode.com/staticman/2019/01/03/create-staticman-instance.html
Turns out I just needed a rubber duck to talk to. I just figured it out.
The “Key format must be specified” error got me thinking about maybe it’s just in the wrong format. Turns out, that was it. The node-rsa module can only import from certain formats, and whatever I had it in wasn’t the right one. So I had to convert it to PEM format. I did that with this:
I gave it my passphrase when it asked, and then there was a new file called
id_rsa.pem
. I used the contents of that in thersaPrivateKey
property (after replacing line breaks with\n
). And nownpm start
works!