Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to setup dev environment on ubuntu 18.04 #1246

Closed
ragnarokatz opened this issue Nov 16, 2019 · 6 comments
Closed

unable to setup dev environment on ubuntu 18.04 #1246

ragnarokatz opened this issue Nov 16, 2019 · 6 comments

Comments

@ragnarokatz
Copy link
Contributor

@ragnarokatz ragnarokatz commented Nov 16, 2019

Describe the problem and steps to reproduce it:

  1. install yarn
  2. install nodejs
  3. type yarn to install
  4. type yarn dev
  5. machine returns error: stmux is not found
  6. run yarn add stmux
  7. run yarn dev

What happened?

server is not running on http://localhost:3000, with errors:

before
then after a bit...
after

What did you expect to happen?

server should be up and running on http://localhost:3000

Anything else we should know?

I tried npm install as well, it seems like that got me a little farther than using yarn. I'm not sure what This project was bootstrapped with Create React App. means in README.md file. Does it mean I have to download create-react-app library in order to use this?

@mirefly

This comment has been minimized.

Copy link
Collaborator

@mirefly mirefly commented Nov 16, 2019

Does it mean I have to download create-react-app library in order to use this?

There is no need to install create-react-app. Running yarn should install all dependencies.
Mixing npm and yarn may cause problems for resolving lock file. Try yarn --force?

@ragnarokatz

This comment has been minimized.

Copy link
Contributor Author

@ragnarokatz ragnarokatz commented Nov 16, 2019

@mirefly thank you for your help and response.
I've pulled a fresh repo from github, and ran only the commands you have suggested, which are yarn --force follwed by yarn dev. I do see some improvements. Now the results are:
improvements

yarn -v displays version 1.19.1

@mirefly

This comment has been minimized.

Copy link
Collaborator

@mirefly mirefly commented Nov 16, 2019

Could you run yarn serve-dev and paste the error message? You can use Ctrl-a k to exit stmux before yarn serve-dev.

@mirefly

This comment has been minimized.

Copy link
Collaborator

@mirefly mirefly commented Nov 16, 2019

And the node version node -v?

@ragnarokatz

This comment has been minimized.

Copy link
Contributor Author

@ragnarokatz ragnarokatz commented Nov 16, 2019

@mirefly node -v returns v10.17.0

The error is the following:

Using ts-node version 8.3.0, typescript version 3.7.2
Error: ENOSPC: System limit for number of file watchers reached, watch '/tmp/.ts-nodehXOR7v/compiled/4994831864305038.req'
    at FSWatcher.start (internal/fs/watchers.js:165:26)
    at Object.watch (fs.js:1258:11)
    at add (/home/hightemplar/addons-code-manager/node_modules/filewatcher/index.js:74:34)
    at /home/hightemplar/addons-code-manager/node_modules/filewatcher/index.js:93:5
    at FSReqWrap.oncomplete (fs.js:154:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This error sometimes occurs in yarn react-scripts-start and yarn test as well, but always occurs when running yarn serve-dev.

I'm running the commands separately now, and they all seem to work individually. However, if I open up 2 terminals, with one running yarn react-scripts-start and one running yarn serve-dev, the above message concerning hitting the system's file watcher limit will be shown in the latest command.

@ragnarokatz

This comment has been minimized.

Copy link
Contributor Author

@ragnarokatz ragnarokatz commented Nov 16, 2019

@mirefly resolved by increasing the number of file watch limit, I've increased it substantially.

command ran:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

source: gatsbyjs/gatsby#11406

Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.