question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Self-hosted API: InvalidAsn1Error on npm start

See original GitHub issue

I’m trying to test a self-hosted version of Staticman.

I followed the instructions on the README:

  1. created a config.development.json based on the sample
  2. added my GitHub Personal Access Token
  3. 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:closed
  • Created 5 years ago
  • Comments:28 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
gabelucicommented, Jan 4, 2019

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

2reactions
gabelucicommented, Jan 2, 2019

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:

openssl rsa -outform PEM -in ~/.ssh/id_rsa -out id_rsa.pem

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 the rsaPrivateKey property (after replacing line breaks with \n). And now npm start works!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found