# Unable to start server on Linux 18.4 LTS in CockpitCMS-React-Static/react-app demo

**URL:** <https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405>\
**Category:** Support\
**Created:** [November 16, 2018, 6:34am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405 "2018-11-16T06:34:21Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Namwanza](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@Namwanza](https://discourse.getcockpit.com/u/Namwanza)\
**Post date:** [November 16, 2018, 6:34am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/1 "2018-11-16T06:34:21Z")

</div>

Hello Cockpit Community,

Can someone help me and tell me why i can’t start local server when i run **yarn install**.

When i run **yarn start** , am getting an error here .

namwanza@Ronnie:/mnt/c/CockpitCMS-React-Static/react-app$ **yarn start**  
**yarn run v1.12.3**  
**$ sh -ac '. .env.local; react-static start’**  
**sh: 1: .: .env.local: not found**  
**error Command failed with exit code 2.**  
**info Visit [https://yarnpkg.com/en/docs/cli/run](https://yarnpkg.com/en/docs/cli/run) for documentation about this command.**

Here is my **package.json**

{  
“name”: “react-static-cockpit-example”,  
“version”: “1.0.1”,  
“main”: “index.js”,  
“license”: “MIT”,  
“scripts”: {  
“start”: “sh -ac ‘. .env.local; react-static start’”,  
“stage”: “react-static build --staging”,  
“build.dev”: “sh -ac ‘. .env.development; react-static build’”,  
“build.prod”: “sh -ac ‘. .env.production; react-static build’”,  
“bundle”: “react-static bundle”,  
“export”: “react-static export”,  
“serve”: “serve dist -p 3000”,  
“deploy.dev”: “yarn build.dev && rm -rf …/public/html/\* && cp -rf dist/\* …/public/html/”,  
“deploy.prod”: “yarn build.prod && rm -rf …/docs/\* && cp -rf dist/\* …/docs/”  
},  
“dependencies”: {  
“axios”: “^0.18.0”,  
“bootstrap”: “^4.1.3”,  
“formik”: “^1.3.1”,  
“graphql-request”: “^1.8.2”,  
“htmr”: “^0.7.0”,  
“leaflet”: “^1.3.4”,  
“react”: “^16.0.0”,  
“react-dom”: “^16.0.0”,  
“react-highlight.js”: “^1.0.7”,  
“react-hot-loader”: “^4.0.0-beta.21”,  
“react-leaflet”: “^2.1.0”,  
“react-player”: “^1.6.6”,  
“react-router”: “^4.2.0”,  
“react-static”: “^5.9.12”,  
“reactstrap”: “^6.5.0”,  
“styled-components”: “^3.4.10”  
},  
“devDependencies”: {  
“eslint-config-react-tools”: “1.x.x”,  
“serve”: “\>=7.0.0”  
}  
}

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [November 16, 2018, 9:19am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/2 "2018-11-16T09:19:59Z")

</div>

Hey @Namwanza, that demo is not part of the official cockpit cms, please open an issue on the github project page - [https://github.com/pauloamgomes/CockpitCMS-React-Static/issues](https://github.com/pauloamgomes/CockpitCMS-React-Static/issues)  
(in such case confirm that you have a .env.local file on the directory, and you have a recent version of node and yarn installed)

---

<div class="post-metadata">

**Author:** ![Namwanza](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@Namwanza](https://discourse.getcockpit.com/u/Namwanza)\
**Post date:** [November 16, 2018, 9:22am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/3 "2018-11-16T09:22:08Z")

</div>

Okay thanks Paul for your positive reply !

---

<div class="post-metadata">

**Author:** ![Namwanza](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@Namwanza](https://discourse.getcockpit.com/u/Namwanza)\
**Post date:** [November 16, 2018, 9:24am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/4 "2018-11-16T09:24:31Z")

</div>

Though i would like to know the difference in cockpitCMS-React-Static demo and cockpit-react-example ?? Coz i want to use react along side cockpit cms.

Thanks

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [November 16, 2018, 9:28am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/5 "2018-11-16T09:28:25Z")

</div>

CockpitCMS-React-Static demo is based on Cockpit and React-Static projects, resuming provides an example of cockpit pre-configured with collections, users and layout components. And an example react application.

---

<div class="post-metadata">

**Author:** ![Namwanza](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@Namwanza](https://discourse.getcockpit.com/u/Namwanza)\
**Post date:** [November 16, 2018, 9:30am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/6 "2018-11-16T09:30:53Z")

</div>

So which of the two is best for me to use for my react app that uses cockpitCMS , cockpitCMS-React-Static demo and cockpit-react-example ?

Coz i have tried running cockpitCMS-React-Static since yesterday but seems not to work, in fact am getting an error as mention above Paul …

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [November 16, 2018, 9:44am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/7 "2018-11-16T09:44:42Z")

</div>

They are just examples and therefore should be used like that, if you plan to build something its always better to create your own structure.  
It should work, did you run `yarn install` before `yarn start`?

---

<div class="post-metadata">

**Author:** ![Namwanza](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@Namwanza](https://discourse.getcockpit.com/u/Namwanza)\
**Post date:** [November 16, 2018, 9:46am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/8 "2018-11-16T09:46:07Z")

</div>

Oh yes i did that Paul

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [November 16, 2018, 9:47am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/9 "2018-11-16T09:47:49Z")

</div>

Open an issue on the github project page with all your details (a screenshot of the error, etc…)

---

<div class="post-metadata">

**Author:** ![Namwanza](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@Namwanza](https://discourse.getcockpit.com/u/Namwanza)\
**Post date:** [November 16, 2018, 9:49am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/10 "2018-11-16T09:49:05Z")

</div>

yes i have already opened an issue.

Thanks

---

<div class="post-metadata">

**Author:** ![pauloamgomes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/pauloamgomes/32/48_2.png) [@pauloamgomes](https://discourse.getcockpit.com/u/pauloamgomes)\
**Post date:** [November 16, 2018, 9:50am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/11 "2018-11-16T09:50:04Z")

</div>

ok, I’ll try to check soon.

---

<div class="post-metadata">

**Author:** ![Namwanza](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@Namwanza](https://discourse.getcockpit.com/u/Namwanza)\
**Post date:** [November 16, 2018, 9:51am UTC](https://discourse.getcockpit.com/t/unable-to-start-server-on-linux-18-4-lts-in-cockpitcms-react-static-react-app-demo/405/12 "2018-11-16T09:51:26Z")

</div>

Thanks Paul. I will be glad !
