Untable to setup layer5 site locally


whenever running make setup command getting this error!

I have WSL , 8gb RAM .

But now again tried one more time following layer5 documentation still getting errors like this while running make setup command

If this works great otherwise try using gitpod

i was using gitpod actually i exhausted my 50 hrs of monthly limit :slightly_smiling_face:

Try using github codespace or any other alternative to gitpod

hey @Savio.Dias trying to use github codespaces too but whenever i am opening it remains stuck in mine dont know why it is so.Few days ago it was working. But not working now

Again tried today but not able to set up locally.Getting this error while running make setup command in my ubuntu terminal

Use WSL2 or a Linux or Mac machine or build it in a container.

yeah…i m using wsl2.


Again tried today after removing layer5 directory and cloning it again and running make setup cmd and make site cmd in my ubuntu wsl2 terminal but got these errors!

Have you tried git bash?

1 Like

+ 1 with @Lee ,
Try Using git bash or Powershell and make sure the packages you need to run site are Installed Globally

(I would avoid Powershell).

2 Likes

@abhijeetgauravm ensure these things.

  1. Use wsl 2 and clone your repo inside linux folder of wsl and open your vscode from that directory.
  2. Gatsby cli should globally installed, sometimes it create conflicts thats why
    Check using: gatsby -v
2 Likes

Hey Community, I am getting these Error outputs and I am using WSL: Ubuntu and made sure Gatsby is installed globally,
Please have a look.

saurabh@Saurabh:/mnt/d/Layer5_Repo/layer5$ make site
npm start

> Layer5@1.0.0 start
> npm run develop


> Layer5@1.0.0 develop
> env-cmd -f .env.development gatsby develop

node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module 'resolve-from'
Require stack:
- /mnt/d/Layer5_Repo/layer5/node_modules/resolve-cwd/index.js
- /mnt/d/Layer5_Repo/layer5/node_modules/gatsby/node_modules/gatsby-cli/lib/create-cli.js
- /mnt/d/Layer5_Repo/layer5/node_modules/gatsby/node_modules/gatsby-cli/lib/index.js
- /mnt/d/Layer5_Repo/layer5/node_modules/gatsby/dist/bin/gatsby.js
- /mnt/d/Layer5_Repo/layer5/node_modules/gatsby/cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/mnt/d/Layer5_Repo/layer5/node_modules/resolve-cwd/index.js:2:21)
    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 Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/mnt/d/Layer5_Repo/layer5/node_modules/resolve-cwd/index.js',
    '/mnt/d/Layer5_Repo/layer5/node_modules/gatsby/node_modules/gatsby-cli/lib/create-cli.js',
    '/mnt/d/Layer5_Repo/layer5/node_modules/gatsby/node_modules/gatsby-cli/lib/index.js',
    '/mnt/d/Layer5_Repo/layer5/node_modules/gatsby/dist/bin/gatsby.js',
    '/mnt/d/Layer5_Repo/layer5/node_modules/gatsby/cli.js'
  ]
}

Node.js v18.18.0
make: *** [Makefile:26: site] Error 1

https://discuss.layer5.io/t/unable-to-run-the-code-for-layer5-repo/2367/4?u=saurabh_singh

Did the same as @Lee has mentioned in the above discussion and moved ahead, but again got stuck with these ones, please have a look

@Saurabh_Singh get your issue in a separate thread so that collaborators can keep focus on issue at a time.

@abhijeetgauravm in order to solve your error, would you answere the following questions,

  1. where you’ve installed npm, on your host Windows or in WSL Ubuntu image?
  2. if it is on WSL, have confiured networking between WSL Ubuntu image and your host Windows?
  3. where have you cloned meshery repository? on host or on WSL Ubuntu image?

and if you are using minikube as platform I recommend you to check this blog on how to setup network between Windows and WSL.

Thanks @Zaki_Shaikh I was able to set it up ultimately few days ago!

1 Like

Thanks @Sudhanshu_Dasgupta was able to set it up few days ago actually i was having npm,nvm issue!

Sure @Zaki_Shaikh. Thank you