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

create-react-app + knex package: yarn test fails #4045

Closed
giona69 opened this issue Feb 20, 2018 · 3 comments
Closed

create-react-app + knex package: yarn test fails #4045

giona69 opened this issue Feb 20, 2018 · 3 comments

Comments

@giona69
Copy link

giona69 commented Feb 20, 2018

Is this a bug report?

yes

Did you try recovering your dependencies?

yarn --version
1.3.2

Environment

  1. node -v: v9.5.0
  2. npm -v: 5.6.0
  3. yarn --version (if you use Yarn): 1.3.2
  4. npm ls react-scripts (if you haven’t ejected):
    [email protected] /Users/gionagranata/WebstormProjects/template-react-app-copia
    └── [email protected]

Then, specify:

  1. Operating system: MasOSX
  2. Browser and version (if relevant): not relevant

Steps to Reproduce

  1. clone create-react-app

  2. yarn install this package.json
    {
    "name": "template-react-app",
    "version": "0.1.0",
    "private": true,
    "engines": {
    "node": ">=6.1.1"
    },
    "dependencies": {
    "compression": "^1.7.0",
    "cookie-parser": "^1.4.3",
    "debug": "~2.6.3",
    "dot": "^1.1.2",
    "express": "~4.16.0",
    "express-dot-engine": "^1.0.7",
    "knex": "^0.14.4",
    "material-ui": "^0.20.0",
    "morgan": "~1.8.1",
    "mysql": "^2.13.0",
    "prop-types": "^15.6.0",
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-redux": "^5.0.6",
    "react-router-dom": "^4.2.2",
    "react-router-redux": "^5.0.0-alpha.9",
    "react-scripts": "1.1.1",
    "redux": "^3.7.2",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.2.0",
    "serve-favicon": "~2.4.2"
    },
    "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "lint": "eslint . --ext js --ignore-path .gitignore",
    "serve": "node init.js",
    "eject": "react-scripts eject"
    },
    "devDependencies": {
    "babel-eslint": "^8.2.1",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-16": "^1.1.1",
    "eslint": "^4.17.0",
    "eslint-config-google": "^0.9.1",
    "eslint-plugin-babel": "^4.1.2",
    "eslint-plugin-node": "^6.0.0",
    "eslint-plugin-react": "^7.6.1",
    "eslint-watch": "^3.1.3",
    "fetch-mock": "^6.0.0",
    "react-test-renderer": "^16.2.0",
    "redux-devtools": "^3.4.1",
    "redux-mock-store": "^1.5.1"
    }
    }

  3. yarn test

Expected Behavior

running tests as usual

Actual Behavior

error is generated :

2018-02-20 10:15 node[4772] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2018-02-20 10:15 node[4772] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
events.js:137
throw er; // Unhandled 'error' event
^

Error: Error watching file for changes: EMFILE
at _errnoException (util.js:1003:13)
at FSEvent.FSWatcher._handle.onchange (fs.js:1382:9)
error Command failed with exit code 1.

Reproducible Demo

https://github.com/giona69/create-react-app-knex

  1. clone the project

  2. yarn test

  3. error

  4. yarn remove knex

  5. yarn test

  6. test is running good

@JCaraballo113
Copy link

Actually getting this exact issue on one of my projects with a wildly different setup. If it's a package causing the issue why would this be?

@Timer
Copy link
Contributor

Timer commented Mar 5, 2018

See #4053, reasoning is the same. For now I suggest you place your client code in an isolated folder with it's own node_modules.

@stale
Copy link

stale bot commented Nov 2, 2018

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs.

@stale stale bot added the stale label Nov 2, 2018
@Timer Timer closed this as completed Nov 2, 2018
@lock lock bot locked and limited conversation to collaborators Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants