NPM requires a peer of but all peers are in package.json and node_modules - node.js

Im facing the problem that npm on install says
npm WARN eslint-config-react-app#2.0.1 requires a peer of babel-eslint#^7.2.3 but none was installed.
npm WARN eslint-config-react-app#2.0.1 requires a peer of eslint-plugin-jsx-a11y#^5.1.1 but none was installed.
npm WARN semantic-ui-react#0.74.2 requires a peer of react#>=0.14.0 <= 15 but none was installed.
npm WARN semantic-ui-react#0.74.2 requires a peer of react-dom#>=0.14.0 <= 15 but none was installed.
What I think is pretty weird is that I have in fact those dependencies in my package.json and also see them inside the node_modules folder.
My package.json:
{
"name": "react-box",
"version": "0.1.0",
"private": true,
"devDependencies": {
"autoprefixer": "7.1.4",
"babel-core": "6.26.0",
"babel-eslint": "^8.0.1",
"babel-jest": "21.2.0",
"babel-loader": "7.1.2",
"babel-preset-react-app": "^3.0.3",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "2.1.0",
"connect-history-api-fallback": "1.3.0",
"cross-spawn": "5.1.0",
"css-loader": "0.28.7",
"detect-port": "1.2.1",
"dotenv": "4.0.0",
"eslint": "4.8.0",
"eslint-config-react-app": "^2.0.1",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.38.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "7.4.0",
"extract-text-webpack-plugin": "3.0.1",
"file-loader": "1.1.5",
"filesize": "3.5.10",
"fs-extra": "4.0.2",
"gzip-size": "4.0.0",
"html-webpack-plugin": "2.30.1",
"http-proxy-middleware": "0.17.4",
"jest": "21.2.1",
"json-loader": "0.5.7",
"object-assign": "4.1.1",
"path-exists": "3.0.0",
"postcss-loader": "2.0.6",
"promise": "8.0.1",
"react-dev-utils": "^4.1.0",
"recursive-readdir": "2.2.1",
"strip-ansi": "4.0.0",
"style-loader": "0.19.0",
"truffle-contract": "^3.0.0",
"truffle-solidity-loader": "0.0.8",
"url-loader": "0.6.2",
"webpack": "3.6.0",
"webpack-dev-server": "2.9.1",
"webpack-manifest-plugin": "1.3.2",
"whatwg-fetch": "2.0.3"
},
"dependencies": {
"axios": "^0.16.2",
"babel-eslint": "^8.0.1",
"dotenv": "^2.0.0",
"react": "^16.0.0",
"react-countup": "^2.2.0",
"react-dom": "^16.0.0",
"semantic-ui-react": "^0.74.2"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx}"
],
"setupFiles": [
"<rootDir>/config/polyfills.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.js?(x)",
"<rootDir>/src/**/?(*.)(spec|test).js?(x)"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web"
},
"moduleFileExtensions": [
"web.js",
"js",
"json",
"web.jsx",
"jsx"
]
},
"babel": {
"presets": [
"react-app"
]
},
"eslintConfig": {
"extends": "react-app"
}
}
When trying to install those peers manually like this:
npm install babel-eslint --save-dev
I still get the error:
├── UNMET PEER DEPENDENCY babel-eslint#8.0.1
├── UNMET PEER DEPENDENCY eslint-plugin-jsx-a11y#6.0.2
├── UNMET PEER DEPENDENCY react#16.0.0
└── UNMET PEER DEPENDENCY react-dom#16.0.0
Maybe I dont understand how NPM works but to my understanding doing the installs manually at least should solve it, right?
If anyone needs more info just comment and I will provide the additional info. Thanks!

NPM warnings about peerDeps versions mismatch are correct here. These packages are installed, but installed versions is not supported by some other packages you have.
In your case - they're too new, meaning that maintainers of warning packages are not updated yet to these versions. And restricted required peerDeps version in API-compatible range (no breaking/major version leap).
eslint-config-react-app#2.0.1 requires a peer deps: babel-eslint#^7.2.3 (i.e. 7.x.x) and eslint-plugin-jsx-a11y#^5.1.1 (i.e. 5.x.x).
Your versions is "babel-eslint": "^8.0.1" and "eslint-plugin-jsx-a11y": "^6.0.2". The first digit - major - is not matched. This is what ^ (caret) mark is about.
Same with semantic-ui-react - they does not support react#16 yet (🤗 I can't wait too!).
Until then you can install packages with exact major version:
> npm view babel-eslint#7.* version // list released versions in required range 7.x.x
babel-eslint#7.0.0 '7.0.0'
babel-eslint#7.1.0 '7.1.0'
babel-eslint#7.1.1 '7.1.1'
babel-eslint#7.2.0 '7.2.0'
babel-eslint#7.2.1 '7.2.1'
babel-eslint#7.2.2 '7.2.2'
babel-eslint#7.2.3 '7.2.3'
> npm install --save-dev babel-eslint#7.2.3 // install latest version in required range
Same with other packages.
PS: also, in package.json you have to delete duplicated records: babel-eslint and dotenv in dependencies, since they are declared in devDependencies already.

Related

POSTCSS - NPM Error Running NPM RUN PRODUCTION

I'm getting the following error anytime I try to run 'npm run production'. The rest of the error is just a list of 'node_modules' packages where this error also occur.
ERROR in ./resources/assets/sass/app.scss
Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'unprefixed' of undefined at clearDecl (/Users/prusso/Sites/qut-match-my-skills/node_modules/postcss-unprefix/lib/clearDecl.js:13:30)
I believe the error is in the version of 'autoprefixer' and/or 'postcss-unprefix'. Please check my 'devDependencies' below:
"devDependencies": {
"autoprefixer": "^8.6.3",
"babel-eslint": "^8.2.6",
"babel-polyfill": "^6.26.0",
"browser-sync": "^2.24.5",
"browser-sync-webpack-plugin": "2.0.1",
"cross-env": "^5.2.0",
"cssnano": "^3.10.0",
"eslint": "^4.0.0",
"eslint-plugin-vue": "^4.7.1",
"laravel-mix": "^2.1.11",
"postcss-unprefix": "^2.1.3",
"prettier-eslint": "^8.8.2",
"raw-loader": "^0.5.1"
},
"dependencies": {
"#nextindex/next-scss": "^1.2.1",
"animate-sass": "^0.8.2",
"axios": "^0.18.0",
"babel-core": "^6.26.3",
"es6-promise": "^4.2.4",
"family.scss": "^1.0.8",
"lodash.compact": "^3.0.1",
"lodash.get": "^4.4.2",
"normalize.css": "^8.0.0",
"portal-vue": "^1.3.0",
"smoothscroll-polyfill": "^0.4.3",
"uuid": "^3.3.2",
"vue": "^2.5.16",
"vue-parallaxy": "^1.1.1",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"vuex-persistedstate": "^2.5.4",
"zeus-grid": "^8.2.0"
}
Other thing that I have noticed is that if I comment out the following line 'require('postcss-unprefix')' inside 'webpack.mix.js' and run 'npm run production' everything works fine.
mix.options({
postCss: [
// require('postcss-unprefix'),
require('autoprefixer')({
browsers: '>0.1%',
}),
require('cssnano')({
preset: [
'default',
{
discardComments: {
removeAll: true,
},
},
],
}),
],
});
Thanks for your help!!
try autoprefixer:10.2.5 latest version
Trt postcss-rtlcss package insted of postcss-rtl
Latest version (postcss#^8.0.0)
npm install postcss-rtlcss --save-dev
Latest legacy version (postcss#^7.0.0)
npm install postcss-rtlcss#legacy --save-dev

Unmet peer dependency after fresh install and deletion of both node_modules and package.json

NPM seems to either not be recognizing or not be installing the packages listed in my package.json. I keep getting warnings which are preventing my build from passing which is a large issue. specifically:
npm WARN react-datepicker#0.49.0 requires a peer of react#^0.14.0 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-datepicker#0.49.0 requires a peer of react-dom#^0.14.0 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-modal#2.4.1 requires a peer of react#^0.14.0 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-modal#2.4.1 requires a peer of react-dom#^0.14.0 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
This warning is confusing for me considering my react dependency is 16.5.0, well beyond ^14.0 or ^15.0. Everything I have looked up has said to delete node_modules and package.json.lock then run npm install but this does not seem to solve the problem or change anything really. Any help would be much appreciated.
here is a copy of my package.json
{
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:3001",
"devDependencies": {
"axios-mock-adapter": "^1.13.1",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.1",
"husky": "^0.13.4",
"lint-staged": "^3.6.1",
"node-sass-chokidar": "0.0.3",
"npm-run-all": "^4.0.2",
"prettier": "^1.10.2",
"react-scripts": "^1.1.4",
"react-test-renderer": "^16.0.0",
"redux-mock-store": "^1.5.1",
"redux-testkit": "^1.0.6"
},
"dependencies": {
"axios": "^0.16.2",
"babel-polyfill": "^6.26.0",
"big.js": "^5.0.3",
"class-names": "^1.0.0",
"create-app": "^0.6.0",
"d3": "^5.5.0",
"d3-array": "^1.2.1",
"d3-scale": "^1.0.6",
"debounce": "^1.0.2",
"font-awesome": "^4.7.0",
"jest-enzyme": "^4.0.1",
"leaflet": "^1.0.3",
"lodash": "^4.17.10",
"lodash.throttle": "^4.1.1",
"mixpanel-browser": "^2.13.0",
"moment": "^2.18.1",
"mousetrap": "^1.6.1",
"numeral": "^2.0.6",
"polyline-encoded": "^0.0.8",
"prop-types": "^15.5.10",
"query-string": "^5.0.0",
"raven-js": "^3.17.0",
"rc-trigger": "^1.11.2",
"react": "^16.5.0",
"react-bootstrap": "^0.32.0",
"react-countup": "^2.1.1",
"react-custom-scrollbars": "^4.1.2",
"react-datepicker": "^0.49.0",
"react-dom": "^16.5.0",
"react-fontawesome": "^1.6.1",
"react-gravatar": "^2.6.3",
"react-leaflet": "^1.3.0",
"react-list": "^0.8.6",
"react-markdown": "^2.5.1",
"react-modal": "^2.3.2",
"react-redux": "^5.0.5",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-slider": "^0.8.0",
"react-sortable-hoc": "^0.6.5",
"react-transition-group": "1.x",
"redux": "^3.6.0",
"redux-form": "^7.0.0",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0",
"reselect": "^3.0.1",
"yarn": "^1.3.2"
},
"scripts": {
"build": "yarn run build-css && react-scripts build",
"build-css": "npm rebuild node-sass && node-sass-chokidar --include-path ./src --include-path ./node_modules ./src/ -o ./src/",
"deploy": "./deploy.sh",
"eject": "react-scripts eject",
"precommit": "lint-staged",
"start": "npm-run-all -p watch-css start-js",
"start-js": "react-scripts start",
"test": "react-scripts test --env=jsdom",
"watch-css": "yarn run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules ./src/ -o ./src/ --watch --recursive"
},
"lint-staged": {
"*.js": [
"prettier --single-quote --write",
"git add",
"prettier --write"
]
}
}
This warning is confusing for me considering my react dependency is 16.5.0, well beyond ^14.0 or ^15.0.
^15.0.0 means anything from 15.0.0 up to (but not including) 16.0.0.
So 16.5.0 is actually too new.

ionic - Confusion about the version

This is my package.json I got from my client:
{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/animations": "^4.1.3",
"#angular/common": "4.1.3",
"#angular/compiler": "4.1.3",
"#angular/compiler-cli": "4.1.3",
"#angular/core": "4.1.3",
"#angular/forms": "4.1.3",
"#angular/http": "4.1.3",
"#angular/platform-browser": "4.1.3",
"#angular/platform-browser-dynamic": "4.1.3",
"#angular/platform-server": "4.1.3",
"#ionic-native/core": "3.12.1",
"#ionic-native/device": "^3.12.1",
"#ionic-native/file-opener": "^3.12.1",
"#ionic-native/geolocation": "^3.12.1",
"#ionic-native/status-bar": "^3.12.1",
"#ionic/storage": "2.0.1",
"#ng-idle/core": "^2.0.0-beta.8",
"#ng-idle/keepalive": "^2.0.0-beta.8",
"#types/ibm-mobilefirst": "0.0.28",
"#types/jquery": "^3.2.6",
"ajv": "^5.2.2",
"ionic-angular": "^3.5.0",
"ionicons": "3.0.0",
"ng2-translate": "^4.2.0",
"rxjs": "5.4.0",
"sw-toolbox": "3.6.0",
"typings": "^2.1.1",
"zone.js": "0.8.12"
},
"devDependencies": {
"#ionic/app-scripts": "^2.0.0",
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-exec": "^0.4.6",
"grunt-file-exists": "^0.1.4",
"grunt-include-replace": "^4.0.1",
"grunt-string-replace": "^1.2.1",
"grunt-template": "^0.2.3",
"typescript": "2.3.4"
},
"cordovaPlugins": [
"ionic-plugin-keyboard",
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen"
],
"cordovaPlatforms": [
"ios",
{
"platform": "ios",
"version": "",
"locator": "ios"
}
],
"description": "online_registration: An Ionic project"
}
And when I tried npm install, I got this warning:
npm WARN #angular/animations#4.3.6 requires a peer of
#angular/core#4.3.6 but none was installed. npm WARN
#angular/platform-server#4.1.3 requires a peer of
#angular/animations#4.1.3 but none was installed. npm WARN
#ionic-native/splash-screen#3.1.0 requires a peer of
#ionic-native/core#3.1.0 but none was installed. npm WARN
#ionic-native/splash-screen#3.1.0 requires a peer of
#angular/core#2.4.8 but none was installed. npm WARN
#ionic-native/splash-screen#3.1.0 requires a peer of rxjs#5.0.1 but
none was installed. npm WARN grunt-template#0.2.3 requires a peer of
grunt#~0.4.0 but none was installed. npm WARN ng2-translate#4.2.0
requires a peer of #angular/core#^2.0.0 but none was installed. npm
WARN ng2-translate#4.2.0 requires a peer of #angular/http#^2.0.0 but
none was installed.
How critical is this?
Then I check the ionic info:
cli packages: (/Users/xxx/.nvm/versions/node/v6.9.1/lib/node_modules)
#ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 6.4.0
local packages:
#ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.1.2 ios 4.1.1
Ionic Framework : ionic-angular 3.6.0
It seems like it did not follow package.json, which ionic-angular is ^3.5.0. Is this correct?
You just need to delete node_modules folder and after that run npm i.Hope everything will be fine then.

How to resolve gulp dependencies while creating a NPM package

I have a nodeJs application(demo) which using commander package to take command line argument and using gulp for
build
docs
test
coverage
This functionality is working fine but Now I need to move this application as a NPM Package.
Changes are done according to according NPM Package but when I install this as NPM package npm install ../demo/ from local location.
It asks for following gulp dependencies: -
Cannot find module gulp
Cannot find module gulp-load-plugins
Cannot find module del
Cannot find module gulp-plumber
Cannot find module gulp-eslint
Cannot find module babel-eslint
Cannot find module gulp-debug
Cannot find module gulp-sourcemaps
Cannot find module gulp-babel
Every time I go back to the npm package(which i created) directory and run the command which occurs as an error like npm install gulp --save-dev and npm install del --save-dev and so on.
I also defined these dependencies in package.json but it is still throwing errors.
Is there any way to resolve this issue.
package.json
{
"name": "demo",
"version": "0.0.1",
"description": "",
"main": "./dist/index.js",
"license": "SEE LICENSE IN LICENSE.md",
"keywords": [],
"scripts": {
"build": "gulp build",
"coverage": "gulp coverage",
"docs": "gulp docs",
"prepublish": "gulp build",
"test": "gulp test"
},
"dependencies": {
"autobind-decorator": "^1.3.3",
"babel-polyfill": "^6.6.1",
"commander": "^2.9.0",
"lodash": "^4.0.0",
"mustache": "^2.2.1",
"source-map-support": "^0.4.0",
"wrench": "^1.5.8",
"ms": "^0.7.1"
"babel-eslint": "^6.0.4",
"babel-plugin-lodash": "^2.2.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-nodejs-lts": "^1.2.2",
"chai": "^3.5.0",
"del": "^2.2.0",
"esdoc-es7-plugin": "^0.0.3",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-babel-istanbul": "^1.1.0",
"gulp-debug": "^2.1.2",
"gulp-esdoc": "^0.2.0",
"gulp-eslint": "^2.0.0",
"gulp-filter": "^4.0.0",
"gulp-inject-modules": "^0.1.1",
"gulp-load-plugins": "^1.2.2",
"gulp-mocha": "^2.2.0",
"gulp-plumber": "^1.1.0",
"gulp-sourcemaps": "^2.0.0-alpha",
"sinon": "^1.17.4",
"sinon-chai": "^2.8.0",
"btoa": "^1.1.2",
"superagent": "^2.1.0"
},
"engines": {
"node": ">=4.0.0"
}
}
I put all the things in dependencies. I tried that way but having same problem.
npm install ../demo/
npm WARN package.json demo_project#1.0.0 No description
npm WARN package.json demo_project#1.0.0 No repository field.
npm WARN package.json demo_project#1.0.0 No README data
> demo#0.0.1 prepublish /work/demo
> gulp build
[16:53:33] Local gulp not found in ~/work/demo
[16:53:33] Try running: npm install gulp
Although the documentation doesn't mention it, npm install folder only installs dependencies and not devDependencies. This may be a little bit confusing as running npm install inside the package folder installs both dependenciesand devDependencies.
So try to install gulpand all the rest as npm install --save gulp (not
--save-dev)
UPDATE: after adding package.json:
everything under devDependencies in your package.json should be under dependencies:
{
"name": "demo",
"version": "0.0.1",
"description": "",
"main": "./dist/index.js",
"license": "SEE LICENSE IN LICENSE.md",
"keywords": [],
"scripts": {
"build": "gulp build",
"coverage": "gulp coverage",
"docs": "gulp docs",
"prepublish": "gulp build",
"test": "gulp test"
},
"dependencies": {
"autobind-decorator": "^1.3.3",
"babel-polyfill": "^6.6.1",
"commander": "^2.9.0",
"lodash": "^4.0.0",
"mustache": "^2.2.1",
"source-map-support": "^0.4.0",
"wrench": "^1.5.8",
"ms": "^0.7.1",
"babel-eslint": "^6.0.4",
"babel-plugin-lodash": "^2.2.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-nodejs-lts": "^1.2.2",
"chai": "^3.5.0",
"del": "^2.2.0",
"esdoc-es7-plugin": "^0.0.3",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-babel-istanbul": "^1.1.0",
"gulp-debug": "^2.1.2",
"gulp-esdoc": "^0.2.0",
"gulp-eslint": "^2.0.0",
"gulp-filter": "^4.0.0",
"gulp-inject-modules": "^0.1.1",
"gulp-load-plugins": "^1.2.2",
"gulp-mocha": "^2.2.0",
"gulp-plumber": "^1.1.0",
"gulp-sourcemaps": "^2.0.0-alpha",
"sinon": "^1.17.4",
"sinon-chai": "^2.8.0",
"btoa": "^1.1.2",
"superagent": "^2.1.0"
},
"engines": {
"node": ">=4.0.0"
}
}

NodeJS start ERROR in ./app/app.jsx Module build failed: ReferenceError: [BABEL]

I am .net developer.Previous developer used nodeJS and react for one project.I must complete that project.That project use nodeJS,and reactJS.I installed NodeJS in windows 8
I install packages(npm install) it worked well.But now I try to run start project(npm start) but it give error about babel.
C:\rc>npm start
> react-seed#0.0.13 prestart C:\rc
> npm install
npm WARN package.json react-seed#0.0.13 No license field.
> node-sass#3.4.2 install C:\rc\node_modules\node-sass
> node scripts/install.js
> node-sass#3.4.2 postinstall C:\rc\node_modules\node-sass
> node scripts/build.js
` C:\rc\node_modules\node-sass\vendor\win32-x64-46\binding.node ` exists.
testing binary.
Binary is fine; exiting.
npm WARN unmet dependency C:\rc\node_modules\rimraf requires glob#'^7.0.0' but w
ill load
npm WARN unmet dependency C:\rc\node_modules\glob,
npm WARN unmet dependency which is version 5.0.15
npm WARN unmet dependency C:\rc\node_modules\babel-plugin-transform-decorators-l
egacy requires babel-runtime#'^6.2.0' but will load
npm WARN unmet dependency C:\rc\node_modules\babel-runtime,
npm WARN unmet dependency which is version 5.8.38
npm WARN unmet dependency C:\rc\node_modules\babel-preset-es2015\node_modules\ba
bel-plugin-transform-regenerator requires babel-core#'^6.6.5' but will load
npm WARN unmet dependency C:\rc\node_modules\babel-core,
npm WARN unmet dependency which is version 5.8.38
npm WARN unmet dependency C:\rc\node_modules\karma-mocha-reporter\node_modules\k
arma requires glob#'^7.0.0' but will load
npm WARN unmet dependency C:\rc\node_modules\glob,
npm WARN unmet dependency which is version 5.0.15
> react-seed#0.0.13 start C:\rc
> set NODE_ENV=development && node dev-server ./webpack/config
Listening at http://0.0.0.0:8000
Hash: dfc04e15fb6c36f0d4eb
Version: webpack 1.12.14
Time: 812ms
Asset Size Chunks Chunk Names
vendor.bundle.js 839 bytes 0 vendor
js\app.0.0.13.js 102 bytes 1 app
chunk {0} vendor.bundle.js (vendor) 28 bytes [rendered]
[0] multi vendor 28 bytes {0} [built] [1 error]
chunk {1} js\app.0.0.13.js (app) 28 bytes {0} [rendered]
[0] multi app 28 bytes {1} [built] [1 error]
ERROR in ./app/app.jsx
Module build failed: ReferenceError: [BABEL] C:\rc\app\app.jsx: Unknown option:
direct.presets
at Logger.error (C:\rc\node_modules\babel-core\lib\transformation\file\logge
r.js:58:11)
at OptionManager.mergeOptions (C:\rc\node_modules\babel-core\lib\transformat
ion\file\options\option-manager.js:126:29)
at OptionManager.init (C:\rc\node_modules\babel-core\lib\transformation\file
\options\option-manager.js:216:10)
at File.initOptions (C:\rc\node_modules\babel-core\lib\transformation\file\i
ndex.js:147:75)
at new File (C:\rc\node_modules\babel-core\lib\transformation\file\index.js:
137:22)
at Pipeline.transform (C:\rc\node_modules\babel-core\lib\transformation\pipe
line.js:164:16)
at transpile (C:\rc\node_modules\babel-loader\index.js:12:22)
at Object.module.exports (C:\rc\node_modules\babel-loader\index.js:71:12)
# multi app
ERROR in ./app/vendor.js
Module build failed: ReferenceError: [BABEL] C:\rc\app\vendor.js: Unknown option
: direct.presets
at Logger.error (C:\rc\node_modules\babel-core\lib\transformation\file\logge
r.js:58:11)
at OptionManager.mergeOptions (C:\rc\node_modules\babel-core\lib\transformat
ion\file\options\option-manager.js:126:29)
at OptionManager.init (C:\rc\node_modules\babel-core\lib\transformation\file
\options\option-manager.js:216:10)
at File.initOptions (C:\rc\node_modules\babel-core\lib\transformation\file\i
ndex.js:147:75)
at new File (C:\rc\node_modules\babel-core\lib\transformation\file\index.js:
137:22)
at Pipeline.transform (C:\rc\node_modules\babel-core\lib\transformation\pipe
line.js:164:16)
at transpile (C:\rc\node_modules\babel-loader\index.js:12:22)
at Object.module.exports (C:\rc\node_modules\babel-loader\index.js:71:12)
# multi vendor
webpack: bundle is now VALID.
Here is my package.json
{
"name": "react-seed",
"version": "0.0.13",
"description": "Seed project for React apps using ES6 & webpack.",
"repository": "https://github.com/badsyntax/react-seed",
"config": {
"buildDir": "./build",
"buildDirTests": "./build_tests",
"devHost": "0.0.0.0",
"devPort": 8000,
"remoteHost": "https://mokey.gear.host"
},
"scripts": {
"build": "NODE_ENV=production npm run webpack",
"clean": "rimraf $npm_package_config_buildDir && mkdir $npm_package_config_buildDir",
"env": "env",
"lint": "eslint --ext .js --ext .jsx ./app ./webpack && echo No linting errors.",
"prebuild": "npm run clean",
"prestart": "npm install",
"pretest": "npm install && npm run lint",
"pretest-travis": "npm install && npm run lint",
"start": "set NODE_ENV=development && node dev-server ./webpack/config",
"test": "NODE_ENV=test karma start --single-run",
"test-dev": "NODE_ENV=test karma start",
"test-travis": "NODE_ENV=test karma start --single-run",
"webpack": "webpack --colors --progress --config ./webpack/config"
},
"dependencies": {
"classnames": "^2.1.1",
"hammerjs": "^2.0.4",
"immutable": "^3.7.6",
"intl": "^1.0.0",
"intl-locales-supported": "^1.0.0",
"jquery": "^2.1.4",
"lodash": "^4.6.1",
"materialize-css": "^0.97.5",
"ms-signalr-client": "^2.2.2",
"normalize.css": "^3.0.3",
"react": "^0.14.7",
"react-dnd": "^2.1.3",
"react-dnd-html5-backend": "^2.1.2",
"react-dom": "^0.14.7",
"react-flexgrid": "^0.7.0",
"react-intl": "^2.0.0-rc-1",
"react-redux": "^4.4.1",
"redux": "^3.3.1",
"redux-thunk": "^2.0.1",
"superagent": "^1.3.0"
},
"devDependencies": {
"autoprefixer-core": "^5.1.11",
"babel-core": "^5.3.3",
"babel-eslint": "^3.1.23",
"babel-loader": "^5.0.0",
"babel-plugin-rewire": "^0.1.8",
"babel-preset-react": "^6.5.0",
"babel-runtime": "^5.3.3",
"chai": "^2.3.0",
"compass-mixins": "^0.12.7",
"css-loader": "^0.12.1",
"eslint": "^0.21.0",
"eslint-plugin-react": "^2.3.0",
"expose-loader": "^0.7.0",
"extract-text-webpack-plugin": "^0.8.0",
"file-loader": "^0.8.1",
"glob": "^5.0.6",
"html-loader": "^0.3.0",
"json-loader": "^0.5.1",
"karma": "^0.12.31",
"karma-chrome-launcher": "^0.1.12",
"karma-cli": "0.0.4",
"karma-mocha": "^0.1.10",
"karma-mocha-reporter": "^1.0.2",
"karma-phantomjs-launcher": "^0.1.4",
"karma-sinon": "^1.0.4",
"karma-source-map-support": "^1.0.0",
"karma-sourcemap-loader": "^0.3.4",
"karma-webpack": "^1.5.1",
"mocha": "^2.2.4",
"mocha-loader": "^0.7.1",
"node-libs-browser": "^0.5.0",
"opn": "^1.0.2",
"postcss-loader": "^0.4.3",
"react-hot-loader": "^1.2.7",
"rimraf": "^2.3.3",
"sass-loader": "^0.4.2",
"sinon": "^1.14.1",
"source-map-support": "^0.2.10",
"style-loader": "^0.12.2",
"template-html-loader": "0.0.3",
"webpack": "^1.9.5",
"webpack-dev-server": "^1.8.2"
},
"engines": {
"node": ">=0.10.0"
},
"eslintConfig": {
"env": {
"browser": true,
"node": true,
"es6": true
},
"ecmaFeatures": {
"modules": true,
"jsx": true
},
"globals": {
"describe": true,
"it": true,
"xit": true,
"xdescribe": true,
"beforeEach": true,
"sinon": true
},
"plugins": [
"react"
],
"parser": "babel-eslint",
"rules": {
"strict": true,
"indent": [
2,
2
],
"quotes": [
2,
"single"
],
"new-cap": 0,
"no-unused-expressions": 0,
"no-underscore-dangle": 0,
"react/display-name": 0,
"react/jsx-quotes": 1,
"react/jsx-no-undef": 1,
"react/jsx-sort-props": 1,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-multi-comp": 1,
"react/no-unknown-property": 1,
"react/prop-types": 1,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/wrap-multilines": 1
}
}
}
Sounds like you have configuration for Babel v6 (e.g. presets option) somewhere (.babelrc?) but you're using Babel v5.

Resources