zeon-studio / hugoplate

Hugoplate is a free starter template built with Hugo and TailwindCSS that will save you hours of work.
https://zeon.studio/preview?project=hugoplate
MIT License
903 stars 246 forks source link

Unable to remove darkmode #38

Closed harisharjun closed 1 year ago

harisharjun commented 1 year ago

While I am running npm run remove-darkmode in the projects folder, I am getting this error:

node:internal/fs/utils:350
    throw err;
    ^

Error: ENOENT: no such file or directory, scandir 'layouts'
    at Object.readdirSync (node:fs:1527:3)
    at removeDarkModeFromPages (/Users/kharisharjun/hugo/hugoplate/scripts/removeDarkmode.js:30:20)
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/kharisharjun/hugo/hugoplate/scripts/removeDarkmode.js:16:10)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: 'layouts'
}

Node.js v18.17.1

Please help me how to proceed. Unable to find any suitable resolution. I suspect it is something to do with my npm, but unable to resolve it...

tfsomrat commented 1 year ago

Please run this command before run project-setup. it must work. thanks

harisharjun commented 1 year ago

Didn't help. I am getting the same error even after npm run project-setup.

tfsomrat commented 1 year ago

I said before, not after

harisharjun commented 1 year ago

I meant I tried it before only. This is the order in which I tried.

npm run project-setup
npm run remove-darkmode

But even after trying this, I am getting the same error.

tfsomrat commented 1 year ago

I don't know man, I just tried it on my machine and other machines too. working perfectly. maybe your node version is not matching. try to install nodejs 18

harisharjun commented 1 year ago

I am on node v18.17.1 But still getting the same error.

tfsomrat commented 1 year ago

In that case, you should remove dark-mode manually, it's not that hard. I checked the script on every platform windows, linux, mac and everywhere it works. I don't know what happened on your end. but I am pretty sure it's not the script issue. thanks

stacygaudreau commented 1 year ago

I ran into this as well.

Correct steps after a fresh git clone of the hugoplate repo to remove dark mode:

  1. cd <reponame>
  2. npm install
  3. npm run remove-darkmode
  4. npm run project-setup

If you forgot the npm install first, you will have issues.

harisharjun commented 1 year ago

I did try the npm install but didn't work.

So, I manually changed the settings in the config file directly to remove the darkmode, and it worked!

Regards!

On Tue, Oct 31, 2023 at 9:26 AM Stacy Gaudreau @.***> wrote:

I ran into this as well.

Correct steps after a fresh git clone of the hugoplate repo to remove dark mode:

  1. cd
  2. npm install
  3. npm run remove-darkmode
  4. npm run project-setup

If you forgot the npm install first, you will have issues.

— Reply to this email directly, view it on GitHub https://github.com/zeon-studio/hugoplate/issues/38#issuecomment-1786398955, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASFEJ7J532BCSFDTFTTUKQTYCBZGTAVCNFSM6AAAAAA4NXHCP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBWGM4TQOJVGU . You are receiving this because you authored the thread.Message ID: @.***>