2016-07-25 9 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の使用に関する複数の回答がありますが、これは現在私には当てはまりません。

私が試した

:レポを吹き飛ばす

  • クリーン
  • すべてのノードモジュールを吹き飛ばす

    • のアンインストールと再インストールノードおよびNPMのバージョン(NVM経由)
    • を、そして
    • NPMキャッシュを再インストールします、および
    私のマシンを再起動して、よい測定のために
  • 再クローニング

    イムランニングノードv0.12.9 & NPMの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

    のconfigパス/Users/Will/.babelrc.presetsはあなたが/Users/Will/.babelrcファイルを持っている、そしてバベル6

    のための設定ファイルのように見えるので、それは"presets"キーを持っているおそらくあなたはバベルを設定するには、/Users/Will/Brandzooka/visibl-front_end/.babelrc.babelrcを持っていることを意味5がインストールされますが、Babel 5はそれを指示しない限り(Babel 6は最初の設定で停止します)、上向きのトラバースを止めず、ホームディレクトリのBabel 6設定でさらに遠くに見えるようになります。

    これは、いくつかのオプションであなたを残します:バベルの設定ファイルではなく、あなたの家では、それらが適用されたプロジェクトに住んでいるはずなので

    • は、/Users/Will/.babelrcを削除します。
    • /Users/Will/Brandzooka/visibl-front_end/.babelrcを開いて(作成するかもしれない)、他の設定ファイルの親ディレクトリの検索を止めるようにBabel 5に指示するキー"breakConfig": trueがあることを確認してください。
    関連する問題