Missing module after running brunch watch -s
See original GitHub issueDescription
Hello, I am having real issues with brunch at the moment. The error is not very consistent because it has not happened in 10hrs but it seems that sometimes when I run brunch watch -s I lose some of the configuration of the files and it throws these warnings followed by the following error below:
01 Apr 09:21:22 - warn: config.files.javascripts.defaultPaths was removed
01 Apr 09:21:22 - warn: config.files.stylesheets.defaultPaths was removed
01 Apr 09:21:22 - warn: config.files.templates.defaultPaths was removed
01 Apr 09:21:22 - error: Initialization error - You probably need to execute `npm install` to install brunch plugins. Error: Cannot find module './lib/core.js'
I have no idea why it suddenly loses the paths and ./lib/core.js module. I follow the instructions it gives me and reinstall brunch with npm install
, do a brunch watch -s
again, it is also worth pointing that it labels brunch as extraneous (whatever that means)
package-name@0.0.1 /Users/lcouto/.Trash/dk-find-out 15.24.21
├── brunch@2.5.3 extraneous
└── node-sass@3.4.2 extraneous
This still does not work. I then proceed in installing brunch globally npm install brunch -g
. But I get the same error and instruction to do an npm install
again. I keep going around in circles with this. What on earth is happening?
Environment
- Brunch: 2.5.3
- Node:v4.4.1
- NPM:3.8.3
- Operating system: MAC OX Yosemite 10.10.5
package.json
contents
"author": "Your Name",
"name": "package-name",
"description": "Package description",
"version": "0.0.1",
"homepage": "",
"repository": {
"type": "git",
"url": ""
},
"engines": {
"node": "~0.6.10"
},
"scripts": {
"start": "brunch watch -s",
"test": "brunch test"
},
"dependencies": {
"autoprefixer": "^6.3.5",
"clean-css-brunch": ">= 1.0 < 1.4",
"css-brunch": ">= 1.0 < 1.4",
"handlebars-brunch": ">= 1.0 < 1.4",
"javascript-brunch": ">= 1.0 < 1.6",
"postcss-brunch": "^0.5.0",
"sass-brunch": "^1.9.2",
"uglify-js-brunch": ">= 1.0 < 1.4"
},
"devDependencies": {
"chai": "1.2.0",
"sinon": "1.4.2",
"sinon-chai": "2.1.2"
}
}
brunch config contents
exports.config =
# Edit the next line to change default build path.
paths:
public: 'public'
plugins:
postcss:
processors: [
require('autoprefixer')(['last 8 versions'])
]
files:
javascripts:
# Defines what file will be generated with `brunch generate`.
defaultExtension: 'js'
# Describes how files will be compiled & joined together.
# Available formats:
# * 'outputFilePath'
# * map of ('outputFilePath': /regExp that matches input path/)
# * map of ('outputFilePath': function that takes input path)
joinTo:
'javascripts/app.js': /^app/
'javascripts/vendor.js': /^vendor/
'test/javascripts/test.js': /^test(\/|\\)(?!vendor)/
'test/javascripts/test-vendor.js': /^test(\/|\\)(?=vendor)/
# Defines compilation order.
# `vendor` files will be compiled before other ones
# even if they are not present here.
order:
before: [
'vendor/scripts/console-helper.js',
'vendor/scripts/modernizr.custom.50279.js',
'vendor/scripts/jquery-1.8.2.min.js',
'vendor/scripts/jquery-ui.js',
'vendor/scripts/respond.min.js',
'vendor/scripts/underscore-1.4.4.js',
'vendor/scripts/backbone-1.0.0.js',
'vendor/scripts/backbone-mediator.js',
'vendor/scripts/tappable-9.9.9.js',
'vendor/scripts/jquery.hammer.js',
'vendor/scripts/masonry.pkgd.js',
'vendor/scripts/jquery.mCustomScrollbar.js',
'vendor/scripts/jquery.ui.touch-punch.js'
# Twitter Bootstrap jquery plugins
#'vendor/scripts/bootstrap/bootstrap-transition.js',
#'vendor/scripts/bootstrap/bootstrap-alert.js',
#'vendor/scripts/bootstrap/bootstrap-button.js',
#'vendor/scripts/bootstrap/bootstrap-carousel.js',
#'vendor/scripts/bootstrap/bootstrap-collapse.js',
#'vendor/scripts/bootstrap/bootstrap-dropdown.js',
#'vendor/scripts/bootstrap/bootstrap-modal.js',
#'vendor/scripts/bootstrap/bootstrap-tooltip.js',
#'vendor/scripts/bootstrap/bootstrap-popover.js',
#'vendor/scripts/bootstrap/bootstrap-scrollspy.js',
#'vendor/scripts/bootstrap/bootstrap-tab.js',
#'vendor/scripts/bootstrap/bootstrap-typeahed.js'
]
after: [
'test/vendor/scripts/test-helper.js'
]
stylesheets:
defaultExtension: 'less'
joinTo:
'stylesheets/app.css': /^(app|vendor)/
'test/stylesheets/test.css': /^test/
# moved all scss files to before
# using after was temperamental
order:
before: [
'app/styles/mixins.scss',
'app/styles/main.scss',
'app/styles/header.scss',
'app/styles/footer.scss',
'app/styles/articles.scss',
'app/styles/landing.scss',
'app/styles/search.scss',
'app/styles/gallery.scss',
'app/styles/video.scss',
'app/styles/quiz.scss',
'app/styles/explore.scss',
'app/styles/hover.scss',
'app/styles/ie.scss'
]
after: [
]
# Updated to sass-brunch@1.9
# Added new path for sass files.
defaultExtension: 'scss'
joinTo:
'stylesheets/app.css': /^app\/styles/
'stylesheets/global.css': /^app\/sass\/config/
templates:
defaultExtension: 'hbs'
joinTo: 'javascripts/app.js'
# Change this if you're using something other than backbone (e.g. 'ember').
# Content of files, generated with `brunch generate` depends on the setting.
# framework: 'backbone'
# Settings of web server that will run with `brunch watch [--server]`.
# server:
# # Path to your server node.js module.
# # If it's commented-out, brunch will use built-in express.js server.
# path: 'server.coffee'
# port: 3333
# # Run even without `--server` option?
# run: yes
Unfortunately I am unable to create a demo app but I hope that the information above gives you enough info.
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (6 by maintainers)
Top GitHub Comments
@goshakkk Can reproduce with the dead-simple-skeleton. Seems related to Linux and fs.write, see https://github.com/Microsoft/vscode/issues/4727
I guess that us getting these issues more than Gulp/Webpack/etc means Brunch is fast enough the OS can’t keep up. So yay Brunch! 😉