As someone who is trying to build a presence online, having a website should be on top of your priority list. It is also a fun learning experience ...
For further actions, you may consider blocking this person and/or reporting abuse
Changing the script part gives the following :
*\Desktop\jvmvl.github.io\gatsby>npm run build
npm ERR! file *\Desktop\jvmvl.github.io\gatsby\package.json
npm ERR! code EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected string in JSON at position 1147 while parsing '{
npm ERR! JSON.parse "name": "portfolio-website-gatsby",'
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
npm ERR! A complete log of this run can be found in:
npm ERR! *\AppData\Roaming\npm-cache_logs\2019-09-16T13_43_16_484Z-debug.log
May you paste your package.json I will take a look what's wrong.
I think the problem is in :
"clean": "del -f \"../!(gatsby)*\" && rm -rf public"
So my question is does it work on windows?
Oh I don't think it will on the command line, have you tried from git bash / wsl / cygwin / mingw on windows?
Just tried it with git bash and it didn't work
I'll check on Windows and get back to you
Great thanks
Hi you can try this on windows
git bash
I have modified the scriptTested using git bash
$ npm run build
success open and validate gatsby-configs — 0.005 s
success load plugins — 0.169 s
error Plugin gatsby-transformer-sharp returned an error
Error: Cannot find module '../build/Release/sharp.node'
loader.js:581 Function.Module._resolveFilename
internal/modules/cjs/loader.js:581:15
loader.js:507 Function.Module._load
internal/modules/cjs/loader.js:507:25
loader.js:637 Module.require
internal/modules/cjs/loader.js:637:17
v8-compile-cache.js:159 require
[gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20
constructor.js:10 Object.
[gatsby]/[sharp]/lib/constructor.js:10:15
v8-compile-cache.js:178 Module._compile
[gatsby]/[v8-compile-cache]/v8-compile-cache.js:178:30
loader.js:700 Object.Module._extensions..js
internal/modules/cjs/loader.js:700:10
loader.js:599 Module.load
internal/modules/cjs/loader.js:599:32
loader.js:538 tryModuleLoad
internal/modules/cjs/loader.js:538:12
loader.js:530 Function.Module._load
internal/modules/cjs/loader.js:530:3
loader.js:637 Module.require
internal/modules/cjs/loader.js:637:17
v8-compile-cache.js:159 require
[gatsby]/[v8-compile-cache]/v8-compile-cache.js:159:20
index.js:3 Object.
[gatsby]/[sharp]/lib/index.js:3:15
v8-compile-cache.js:178 Module._compile
[gatsby]/[v8-compile-cache]/v8-compile-cache.js:178:30
loader.js:700 Object.Module._extensions..js
internal/modules/cjs/loader.js:700:10
loader.js:599 Module.load
internal/modules/cjs/loader.js:599:32
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! portfolio-website-gatsby@1.0.0 build:
npm run clean && gatsby build && cp -a public/* ../
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the portfolio-website-gatsby@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! ***\Roaming\npm-cache_logs\2019-09-21T10_21_33_887Z-debug.log
You can try, Deleting
node_modules
,.cache
,public
then doIf its still not working on your machine for some reason, then install
sharp
manuallyMake a few changes on scripts provided to make it work properly for me
May I know what is your operating system? I will update the article
Hey! this is a great step by step tutorial but i have really serious trouble when i try to build a portfolio if you can help me i appreciate.
I work on windows with GitBash and when i try to running npm run build throws the following error:
And this is the package.json file:
Please Help Me!
CODE THE WORLD
Can you give me link to your repo so I can help you
Yep, a great step by step to getting set up and started.
I love seeing people share these kinds of posts as we all often do these workflows without thinking and never stop and go back to document them for others.
You are right, its tedious to come up with something like this. But, it's a pleasure to help people who are starting out.
Hi there. I followed all step-by-step but I unable to deploy the portfolio website. Here is my repo:
github.com/ambriel2016/crb.github.io
Also, here are some screenshots with the following errors:
Hi just saw your message, wanted to help you but I don't see the screenshots and your repository anymore.
Great intro article to help folks get started using Gatsby!
As a next step, I highly recommend looking into a Headless CMS to manage the content on your websites as they get bigger.
Here is a step by step guide about how to create your blog site using Gatsby.
zeptobook.com/create-your-blog-sit...
Another Screenshot