2016-07-25 3 views
2

Так что я полностью озадачен этим. Моя команда работает на той же ветке, такой же фиксации кода. Я единственный, у кого есть эта проблема. Вот полный трассировки стека:Ошибка сборки модуля: ReferenceError: [BABEL] Неизвестная опция: /Users/Will/.babelrc.presets

Module build failed: ReferenceError: [BABEL] /Users/Will/Brandzooka/visibl-front_end/node_modules/eslint-loader/index.js!/Users/Will/Brandzooka/visibl-front_end/app/index.jsx: Unknown option: /Users/Will/.babelrc.presets 
    at Logger.error (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-core/lib/transformation/file/logger.js:58:11) 
    at OptionManager.mergeOptions (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:29) 
    at OptionManager.addConfig (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10) 
    at OptionManager.findConfigs (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35) 
    at OptionManager.init (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12) 
    at File.initOptions (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-core/lib/transformation/file/index.js:147:75) 
    at new File (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-core/lib/transformation/file/index.js:137:22) 
    at Pipeline.transform (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-core/lib/transformation/pipeline.js:164:16) 
    at transpile (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-loader/index.js:12:22) 
    at Object.module.exports (/Users/Will/Brandzooka/visibl-front_end/node_modules/babel-loader/index.js:69:12) 

Я пришел через несколько ответов, которые все связаны с использованием Бабель 6, который в настоящее время не относится ко мне.

Я пробовал:

  • деинсталляция и переустановку узлов и НУЮ версию (через NVM)
  • сносит все узловые модули, и повторную
  • кэш
  • НОГО чистого
  • сносит репо , и повторное клонирование
  • Для хорошей оценки, перезагрузка машины

Im работает узел v0.12.9 & НПМ v2.14.9

Вот мой package.json

{ 
    "version": "0.0.0", 
    "main": "app/index.js", 
    "private": true, 
    "scripts": { 
    "build": "CONFIG_ENV=dev Q_DEBUG=1 time ./node_modules/.bin/webpack --config conf/webpack.production.js", 
    "build:prod": "CONFIG_ENV=production time ./node_modules/.bin/webpack --config conf/webpack.production.js", 
    "build:stage": "CONFIG_ENV=stage time ./node_modules/.bin/webpack --config conf/webpack.production.js", 
    "deploy:codeship-getvisibl": "time firebase deploy --token $FIREBASETOKEN", 
    "deploy:codeship-stage": "time firebase deploy --token $FIREBASETOKEN --project firebase-visibl-stage", 
    "deploy:stage": "firebase use firebase-visibl-stage && firebase deploy", 
    "lint": "PATH=$PATH:/usr/local/bin time ./node_modules/eslint/bin/eslint.js --cache --format 'node_modules/eslint-friendly-formatter' --ext .js --ext .jsx --config .eslintrc app/", 
    "migrate": "babel-node --stage 1 migrate.js", 
    "start": "CONFIG_ENV=dev Q_DEBUG=1 ./node_modules/.bin/webpack-dev-server --config conf/webpack.config.js --hot --progress --inline --content-base ./build", 
    "start:prod": "CONFIG_ENV=production Q_DEBUG=1 ./node_modules/.bin/webpack-dev-server --config conf/webpack.config.js --hot --progress --inline --content-base ./build", 
    "debug": "CONFIG_ENV=dev Q_DEBUG=1 time ./node_modules/.bin/mocha debug --full-trace --colors --recursive app/mochaNodeSetup.js app", 
    "test": "CONFIG_ENV=dev Q_DEBUG=1 time ./node_modules/.bin/mocha --full-trace --colors --bail --recursive app/mochaNodeSetup.js app" 
    }, 
    "dependencies": { 
    "@brandzooka/client": "*", 
    "@brandzooka/models": "*", 
    "autoprefixer-loader": "2.0.0", 
    "aws-sdk": "^2.3.7", 
    "babel-core": "5.8.38", 
    "babel-loader": "5.3.2", 
    "baconjs": "0.7.66", 
    "bluebird": "2.10.1", 
    "bootstrap-sass": "3.3.5", 
    "bootstrap-slider": "4.10.0", 
    "chai": "3.0.0", 
    "chai-immutable": "1.0.2", 
    "classnames": "2.1.2", 
    "clear-require": "^1.0.1", 
    "cls-bluebird": "^1.0.1", 
    "css-loader": "0.15.1", 
    "dom-scroll-into-view": "1.2.0", 
    "eslint": "1.4.3", 
    "eslint-friendly-formatter": "1.0.8", 
    "eslint-loader": "^1.0.0", 
    "eslint-plugin-mocha": "0.4.0", 
    "eslint-plugin-react": "3.4.1", 
    "exports-loader": "0.6.2", 
    "file-loader": "0.8.4", 
    "immutable": "3.7.4", 
    "immutable-form-validation": "1.0.4", 
    "imports-loader": "0.6.4", 
    "jquery": "2.1.4", 
    "jsdom": "2.0.0", 
    "json-loader": "0.5.2", 
    "lodash": "3.10.1", 
    "mocha": "2.2.5", 
    "moment": "2.10.3", 
    "node-libs-browser": "0.5.2", 
    "node-sass": "3.2.0", 
    "nomnom": "^1.8.1", 
    "null-loader": "0.1.1", 
    "phantomjs": "1.9.18", 
    "precommit-hook": "2.0.1", 
    "q": "1.4.1", 
    "query-string": "3.0.3", 
    "rc-form-validation": "2.4.12", 
    "react": "^0.14.0", 
    "react-addons-pure-render-mixin": "0.14.0", 
    "react-addons-test-utils": "0.14.0", 
    "react-bootstrap": "0.29.5", 
    "react-bootstrap-daterangepicker": "0.2.5", 
    "react-dom": "0.14.0", 
    "react-dropzone": "1.2.2", 
    "react-hot-loader": "1.2.7", 
    "react-moment-proptypes": "0.0.5", 
    "react-router": "0.13.5", 
    "react-slick": "0.12.2", 
    "readline2": "^1.0.1", 
    "reflux": "0.4.1", 
    "reflux-core": "0.3.0", 
    "reflux-promise": "1.0.4", 
    "sass-loader": "1.0.2", 
    "sha.js": "2.4.5", 
    "sinon": "1.15.4", 
    "sinon-chai": "2.8.0", 
    "sinon-react": "0.2.1", 
    "style-loader": "0.12.3", 
    "superagent": "1.2.0", 
    "superagent-promise": "1.0.0", 
    "url": "0.10.3", 
    "url-loader": "0.5.6", 
    "uuid": "2.0.2", 
    "valid-url": "1.0.9", 
    "whatwg-fetch": "0.9.0" 
    }, 
    "devDependencies": { 
    "babel": "5.8.38", 
    "babel-eslint": "^6.0.0-beta.6", 
    "chai-spies": "^0.7.1", 
    "clean-webpack-plugin": "0.1.3", 
    "estraverse": "^4.2.0", 
    "extract-text-webpack-plugin": "0.8.2", 
    "firebase-token-generator": "^2.0.0", 
    "html-webpack-plugin": "1.5.2", 
    "pg": "^4.4.2", 
    "pg-parse-float": "0.0.1", 
    "webpack": "*", 
    "webpack-dev-server": "*" 
    } 
} 

Любые горячие идеи там? 3 часа, я даже не могу получить сообщение об ошибке для изменения.

ответ

4

Конфигурационный путь /Users/Will/.babelrc.presets означает, что вы едите .babelrc файла в /Users/Will/, и он имеет "presets" ключ, потому что, как представляется, конфигурационный файл для Вавилонской 6.

Вероятно, у вас есть .babelrc в /Users/Will/Brandzooka/visibl-front_end/.babelrc настроить Бабель 5, но Babel 5 не останавливается, переходя вверх, ища другие конфиги, если вы не сообщите об этом (Babel 6 останавливается в первой конфигурации), поэтому он также будет выглядеть дальше и выходить из конфигурации Babel 6 в вашем домашнем каталоге.

Это оставляет вам несколько вариантов:

  • Удалить /Users/Will/.babelrc, потому что Бабель конфигурационные файлы должны жить в проекте они применяются, а не в вашем доме.
  • Если это не-go, откройте (и, возможно, создайте) /Users/Will/Brandzooka/visibl-front_end/.babelrc и убедитесь, что у него есть ключ "breakConfig": true, чтобы сообщить Babel 5 прекратить поиск в родительских каталогах для других файлов конфигурации.