Closed maxime1992 closed 4 years ago
Hi Maxime,
Thanks so much for taking a look at this for me. I'm completely new to this and just started learning how to use git and Github. I see the dev-to-git.json and .prettierrc files in the folder but I'm not sure how to upgrade these dependencies. Is this something I would do in the command line? If you have a link to a resource that could point me in the right direction, I'd greatly appreciate it!
Thanks again!
Sure no worries. Do you have node and yarn installed on your machine? :)
Thanks so much! Yes, I do remember installing node and yarn via the terminal.
On Wed, Jan 15, 2020, 4:49 AM Maxime notifications@github.com wrote:
Sure no worries. Do you have node and yarn installed on your machine? :)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maelingmurphy/my-dev.to/issues/1?email_source=notifications&email_token=ADKR4LDOX5V7S6FY6CAVKPDQ53L3DA5CNFSM4KFY2TZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI7WRWI#issuecomment-574580953, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKR4LDBEJKGNS32MRJVTZDQ53L3DANCNFSM4KFY2TZQ .
Awesome. So, from your terminal go to the root of the project and run:
yarn upgrade-interactive -E --latest
You'll see the few dependencies of the project that can be updated. Use arrow keys to go up and down, press space to select the ones that should be updated (probably all of them).
Once you're done, press enter.
Commit the changes files and let me know if that helps :+1:
same problem even with new deps
"dependencies": { "dev-to-git": "1.4.1", "embedme": "1.19.0", "prettier": "1.19.1" }
does this error help ?
$ DEV_TO_GIT_TOKEN=DEV_TO_GIT_TOKEN yarn run dev-to-git
yarn run v1.21.1
$ dev-to-git
[DRAFT] Article "Manage your dev.to blog posts from a GIT repo and use continuous deployment to auto publish/update them" encountered an error:
Error name: "HTTPError"
Error message: "Response code 401 (Unauthorized)"
Error stack: "HTTPError: Response code 401 (Unauthorized)
at EventEmitter.emitter.on (/home/cdarra/git/my-dev-to-pages/node_modules/dev-to-git/bin/dev-to-git.umd.js:7080:23)
at
what does this error mean ? "Response code 422 (Unprocessable Entity)"
$ DEV_TO_GIT_TOKEN=XXXXXXXXXXXXXXXX yarn run dev-to-git
yarn run v1.21.1
$ dev-to-git
[DRAFT] Article "Manage your dev.to blog posts from a GIT repo and use continuous deployment to auto publish/update them" encountered an error:
Error name: "HTTPError"
Error message: "Response code 422 (Unprocessable Entity)"
Error stack: "HTTPError: Response code 422 (Unprocessable Entity)
at EventEmitter.emitter.on (/home/cdarra/git/my-dev-to-pages/node_modules/dev-to-git/bin/dev-to-git.umd.js:7080:23)
at
thanks now working
$ yarn run prettier:check yarn run v1.21.1 $ yarn run prettier:base --list-different $ yarn run prettier "*/.{js,json,scss,md,ts,html,component.html}" --list-different $ prettier '*/.{js,json,scss,md,ts,html,component.html}' --list-different Done in 3.79s. cdarra@vbox-xubu-64:~/git/my-dev-to-pages$ DEV_TO_GIT_TOKEN=XXXX run dev-to-git yarn run v1.21.1 $ dev-to-git [DRAFT] Article "239000" has been successfully updated [DRAFT] Article "239001" has been successfully updated Done in 2.82s. cdarra@vbox-xubu-64:~/git/my-dev-to-pages$
Awesome. So, from your terminal go to the root of the project and run:
yarn upgrade-interactive -E --latest
You'll see the few dependencies of the project that can be updated. Use arrow keys to go up and down, press space to select the ones that should be updated (probably all of them).
Once you're done, press enter.
Commit the changes files and let me know if that helps 👍
Hi Maxime,
Thanks for the clear instructions! I was able to upgrade all dependencies successfully. However, I still don't see updates being made to the draft post on dev.to after committing my file changes. I'm really not sure what I'm missing here. Thanks again for your help!
This is the draft post I have linked via the id # in the dev-to-git.json file
I was able to upgrade all dependencies successfully
Great! :smiley:!
I just took a look at your build:
It's failing, hence why the article has not been updated. If you click on that red cross, you'll get some details about why it failed:
But what's prettier:check
exactly :thinking: ?
If you take a look into your package.json:
https://github.com/maelingmurphy/my-dev.to/blob/master/package.json#L11-L12
There is that script :)
It's just checking on CI that all the formatting on your repo is fine :ok_hand: --> Which is apparently not right now.
So what you've got to do now is:
yarn run prettier:write
On CI, it should be fine and therefore it will move on the next stage which is the publishing of your article :) (by publishing I just mean pushing on dev.to your article or draft :+1:)
I'm pretty sure it'll be fine from now on, let me know :+1:
Hi Maxime,
Thanks again for pointing out these steps! I was not aware of the status icon for the repository before.
I did a local run of yarn run pretier:write
I committed and pushed all of the updated files
I checked that my latest commits were successful and that the build finished successfully on CI
I checked the id and relative path of the article in my dev-to-git.json file
Yet still no updates to the draft post here: https://dev.to/maelingmurphy/test-post-for-github-mn8-temp-slug-6670523?preview=9cac8f6b7cb237a95dee8510648abd589cf74df05c66e93fd2dff50721ec5387f22a70fe47976f35a2d48ed30517d5a2ed2e8cfd989e2abf6dbfe156
I noticed that although the build exited with 0 on CI, that there was still an error message here pertaining to the article that I wasn't sure how to interpret:
Do you have any thoughts on next steps?
Thanks again for the assistance!
Hey, thanks for the good description!
Worry no more: I know where it's coming from and.. It's on me... 😅
There's an issue on the lib I've built https://github.com/maxime1992/dev-to-git/issues/19#issuecomment-577413138
So go to dev.to directly, open your article, type anything there (dummy title, dummy content) and re run the CI. It should be working from there! 😁
Hey Maxime!
No problem! I'm happy to report success at last!! Thank you so much for walking me through this. This was an incredible learning experience, making me more comfortable with Git and Github for sure. Plus, you introduced me to the concept of continuous integration via Travis CI! So grateful for the experience 😀
You're very welcome @maelingmurphy!
Glad you learnt a few things on the way, keep it up and have fun publishing articles :tada:
Hi Maeling,
I've seen your comment on dev.to :)
https://dev.to/maelingmurphy/comment/k25j
Can you please upgrade all the dependencies (only dev-to-git needed but good to do them all):
then run
yarn
to upgrade them + the lock file.We'll see from there if it works or gives us an error on CI maybe.
Let me know when it's done