Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Issue when using neutrino-preset-jest #109

Closed
sheerun opened this issue Mar 13, 2017 · 3 comments
Closed

Issue when using neutrino-preset-jest #109

sheerun opened this issue Mar 13, 2017 · 3 comments

Comments

@sheerun
Copy link

sheerun commented Mar 13, 2017

> neutrino start

/Users/sheerun/Source/Projects/tunnel/node_modules/neutrino/src/neutrino.js:34
          throw exception;
          ^

TypeError: Neutrino was unable to load the module 'neutrino-preset-jest'. Ensure this module exports a function and is free from errors.
Cannot read property 'tap' of undefined
    at loader (/Users/sheerun/Source/Projects/tunnel/node_modules/webpack-chain/src/Rule.js:21:15)
    at module.exports.neutrino (/Users/sheerun/Source/Projects/tunnel/node_modules/neutrino-preset-jest/src/index.js:54:6)
    at Neutrino.presets.forEach.exception (/Users/sheerun/Source/Projects/tunnel/node_modules/neutrino/src/neutrino.js:26:35)

My package.json

{
  "name": "tunnel",
  "version": "1.0.0",
  "main": "index.js",
  "repository": {},
  "license": "MIT",
  "scripts": {
    "build": "neutrino build",
    "start": "neutrino start",
    "test": "neutrino test",
    "test:coverage": "neutrino test --coverage",
    "test:watch": "neutrino test --watch"
  },
  "devDependencies": {
    "neutrino": "^4.3.1",
    "neutrino-preset-dev-errors": "^1.0.4",
    "neutrino-preset-jest": "^4.3.0",
    "neutrino-preset-react": "^4.2.3",
    "neutrino-preset-sass": "^1.0.3"
  },
  "config": {
    "presets": [
      "neutrino-preset-dev-errors",
      "neutrino-preset-jest",
      "neutrino-preset-react",
      "neutrino-preset-sass"
    ]
  },
  "dependencies": {
    "react": "^15.4.2",
    "react-dom": "^15.4.2"
  }
}

@eliperelman
Copy link
Member

This most likely stems from the Jest preset trying to extend a babel configuration that does not yet exist. For the meantime, move the Jest preset to load after the react preset.

@sheerun
Copy link
Author

sheerun commented Mar 13, 2017

I guess this relates to #107 as I need to manually figure out correct order or presets. Some sort of automatic topological maybe would improve experience.

@eliperelman
Copy link
Member

Fixed in #110.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants