首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >早午餐坚持“试着加载早午餐-配置”

早午餐坚持“试着加载早午餐-配置”
EN

Stack Overflow用户
提问于 2018-03-18 21:13:38
回答 1查看 305关注 0票数 0

背景

我有一个灵丹妙药/菲尼克斯项目,使用默认的早午餐设置(增加了一些附加功能,比如sass和react)。

它工作了很长一段时间,但是今天它自发地停止编译任何东西,我不知道为什么。

症状

当我运行brunch build --stdinbrunch watch --stdin时,它只会挂起。没有打印到控制台,没有编译,没有错误。

当我运行brunch watch --debug --stdin

它打印:

brunch:config Trying to load brunch-config +0ms

没别的事了。大概它从来没有真正加载早午餐配置。

我到目前为止做了什么,

  • 重复检查,它在其他菲尼克斯项目中仍然有效
  • 删除所有deps/node_模块,重新安装,然后再试一次。

brunch-config.js

代码语言:javascript
复制
exports.config = {
  files: {
    javascripts: {
      joinTo: "js/app.js"
    },
    stylesheets: {
      joinTo: "css/app.css"
    },
    templates: {
      joinTo: "js/app.js"
    }
  },

  conventions: {
    assets: /^(static)/
  },

  paths: {
    watched: ["static", "css", "js", "vendor"],
    public: "../priv/static"
  },

  plugins: {
    postcss: {
        processors: [
            require('autoprefixer')(['last 8 versions']),
            require('csswring')()
        ]
    }
  },

  modules: {
    autoRequire: {
      "js/app.js": ["js/app"]
    }
  },

  npm: {
    enabled: true
  }
};

.babelrc

代码语言:javascript
复制
{
  "presets": ["env", "stage-2", "react", "flow"],
  "env": {
      "development": {
          "sourceMaps": "inline",
          "plugins": ["source-map-support"]
      }
  },
  "plugins": [
    "syntax-object-rest-spread",
    "transform-flow-strip-types",
    "transform-es2015-destructuring",
    "transform-es2015-parameters",
    "transform-object-rest-spread",
    ["transform-runtime", {
      "helpers": false,
      "polyfill": false,
      "regenerator": true,
      "moduleName": "babel-runtime"
    }]
  ]
}

package.json

代码语言:javascript
复制
{
  "repository": {},
  "name": "ewb",
  "version": "1.0.0",
  "license": "MIT",
  "scripts": {
    "deploy": "brunch build --production",
    "watch": "brunch watch --stdin",
    "test": "NODE_ENV=test jest --verbose"
  },
  "jest": {
    "testEnvironment": "node",
    "transform": {
      "^.+\\.jsx?$": "babel-jest"
    }
  },
  "dependencies": {
    "autobind-decorator": "^2.1.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react": "^6.24.1",
    "babel-runtime": "^6.26.0",
    "extensible-runtime": "^4.1.0",
    "immutable": "^3.8.2",
    "lodash": "^4.17.5",
    "normalize-scss": "^7.0.1",
    "normalizr": "^3.2.4",
    "phoenix": "file:../deps/phoenix",
    "phoenix_html": "file:../deps/phoenix_html",
    "react": "^16.2.0",
    "react-phoenix": "file:../deps/react_phoenix",
    "react-redux": "^5.0.7",
    "redux": "^3.7.2",
    "redux-devtools": "^3.4.1",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.2.0"
  },
  "devDependencies": {
    "autoprefixer": "^8.0.0",
    "babel-brunch": "^6.1.1",
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.0",
    "babel-jest": "^22.4.1",
    "babel-plugin-extensible-destructuring": "^4.2.0",
    "babel-plugin-syntax-object-rest-spread": "^6.13.0",
    "babel-plugin-transform-es2015-destructuring": "^6.23.0",
    "babel-plugin-transform-es2015-parameters": "^6.24.1",
    "babel-plugin-transform-es2015-spread": "^6.22.0",
    "babel-plugin-transform-flow-strip-types": "^6.22.0",
    "babel-plugin-transform-object-rest-spread": "^6.26.0",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-flow": "^6.23.0",
    "babel-preset-stage-2": "^6.24.1",
    "brunch": "2.10.9",
    "clean-css-brunch": "2.10.0",
    "csswring": "^6.0.3",
    "flow-bin": "^0.66.0",
    "flow-brunch": "^0.2.4",
    "jest": "^22.4.2",
    "node-sass": "^4.7.2",
    "postcss-brunch": "^2.1.0",
    "regenerator-runtime": "^0.11.1",
    "sass-brunch": "^2.10.4",
    "uglify-js-brunch": "2.10.0"
  }
}

EN

回答 1

Stack Overflow用户

发布于 2018-03-19 02:35:37

重新启动我的电脑,它现在开始工作了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49352857

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档