简体   繁体   中英

Brunch stuck on “Trying to load brunch-config”

Background

I have an elixir/phoenix project, using the default brunch setup (with a couple additions like sass and react).

It has been working great for a while, but today it spontaneously stopped compiling anything, and I can't figure out why.

Symptoms

在此处输入图片说明

When I run brunch build --stdin or brunch watch --stdin , it just hangs. Nothing is printed to console, nothing gets compiled, no errors.

When I run brunch watch --debug --stdin

it prints:

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

And nothing else. Presumably it never actually loads brunch-config.

What I've done so far

  • double checked it still works in other phoenix projects
  • deleted all deps/node_modules, reinstalled, and tried again.

brunch-config.js

 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

 { "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

 { "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" } } 

重新启动我的计算机,它现在可以工作了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM