Skip to content

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

Closed
@giona69

Description

@giona69

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions