DEV Community

Clive Da
Clive Da

Posted on

autoposting from github to devto

im trying out autoposting from github to devto as per devto autoposting and its fantastic IF you format your dev-to-git.json correctly

my devto pages github repo is at

my devto autoposted pages are at

test locally by running embed and pretty locally before you PUSH to github

$ yarn embed
$ yarn prettier

see if you are getting yarn prettier errors "EXIT 1" is BAD

LOCAL ERORRS

$ yarn prettier:check
yarn run v1.21.1
warning package.json: No license field
$ yarn run prettier "**/*.{js,json,scss,md,ts,html,component.html}" --list-different
warning package.json: No license field
$ prettier '**/*.{js,json,scss,md,ts,html,component.html}' --list-different
dev-to-git.json
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

TRAVIS ERORRS

$ yarn run v1.3.2

(node:6183) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

warning package.json: No license field

$ yarn run prettier:base --list-different


$ yarn run prettier "**/*.{js,json,scss,md,ts,html,component.html}" --list-different

warning package.json: No license field

$ prettier '**/*.{js,json,scss,md,ts,html,component.html}' --list-different

dev-to-git.json

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

error Command failed with exit code 1.

Top comments (7)

Collapse
 
maxime1992 profile image
Maxime

Hi Clive, can you please update all the dependencies?

Also please check this thread where I've explained a bit further how to fix this github.com/maelingmurphy/my-dev.to...

Collapse
 
osde8info profile image
Clive Da

have a look at my repo ive already updated deps BUT still getting errors

"dependencies": {
    "dev-to-git": "1.4.1",
    "embedme": "1.19.0",
    "prettier": "1.19.1"
  }

:(
Collapse
 
maxime1992 profile image
Maxime

have you checked those issues:

github.com/maxime1992/dev.to/issues/6

github.com/maxime1992/dev.to/issues/7

So try running yarn run prettier:write basically :)

Thread Thread
 
maxime1992 profile image
Maxime

From your travis build:

The command "yarn run prettier:check" exited with 1.

So yeah you just need to run prettier your formatting is not correct that's it.

Just run yarn run prettier:write :)

Thread Thread
 
osde8info profile image
Clive Da
Collapse
 
osde8info profile image
Clive Da

now getting "Response code 422 (Unprocessable Entity)" see full error report at github.com/maelingmurphy/my-dev.to...

Collapse
 
0xdonut profile image
Mr F. • Edited

I commented out the prettier command, worked somewhat