{"action":"created","issue":{"url":"https://api.github.com/repos/brunch/brunch/issues/1271","repository_url":"https://api.github.com/repos/brunch/brunch","labels_url":"https://api.github.com/repos/brunch/brunch/issues/1271/labels{/name}","comments_url":"https://api.github.com/repos/brunch/brunch/issues/1271/comments","events_url":"https://api.github.com/repos/brunch/brunch/issues/1271/events","html_url":"https://github.com/brunch/brunch/issues/1271","id":145134406,"number":1271,"title":"Missing module after running brunch watch -s","user":{"login":"Itagiba","id":6554881,"avatar_url":"https://avatars.githubusercontent.com/u/6554881?v=3","gravatar_id":"","url":"https://api.github.com/users/Itagiba","html_url":"https://github.com/Itagiba","followers_url":"https://api.github.com/users/Itagiba/followers","following_url":"https://api.github.com/users/Itagiba/following{/other_user}","gists_url":"https://api.github.com/users/Itagiba/gists{/gist_id}","starred_url":"https://api.github.com/users/Itagiba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itagiba/subscriptions","organizations_url":"https://api.github.com/users/Itagiba/orgs","repos_url":"https://api.github.com/users/Itagiba/repos","events_url":"https://api.github.com/users/Itagiba/events{/privacy}","received_events_url":"https://api.github.com/users/Itagiba/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brunch/brunch/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-04-01T09:37:51Z","updated_at":"2016-06-01T19:11:12Z","closed_at":null,"body":"### Description\r\nHello, 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:\r\n\r\n```\r\n01 Apr 09:21:22 - warn: config.files.javascripts.defaultPaths was removed\r\n01 Apr 09:21:22 - warn: config.files.stylesheets.defaultPaths was removed\r\n01 Apr 09:21:22 - warn: config.files.templates.defaultPaths was removed\r\n01 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'\r\n```\r\n\r\nI 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)\r\n\r\n```\r\npackage-name@0.0.1 /Users/lcouto/.Trash/dk-find-out 15.24.21\r\n├── brunch@2.5.3  extraneous\r\n└── node-sass@3.4.2  extraneous\r\n```\r\n\r\nThis 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?\r\n\r\n### Environment\r\n\r\n1. Brunch: **2.5.3**\r\n2. Node:**v4.4.1**\r\n3. NPM:**3.8.3**\r\n4. Operating system: MAC OX Yosemite 10.10.5 \r\n\r\n### `package.json` contents\r\n\r\n```\r\n  \"author\": \"Your Name\",\r\n  \"name\": \"package-name\",\r\n  \"description\": \"Package description\",\r\n  \"version\": \"0.0.1\",\r\n  \"homepage\": \"\",\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"\"\r\n  },\r\n  \"engines\": {\r\n    \"node\": \"~0.6.10\"\r\n  },\r\n  \"scripts\": {\r\n    \"start\": \"brunch watch -s\",\r\n    \"test\": \"brunch test\"\r\n  },\r\n  \"dependencies\": {\r\n    \"autoprefixer\": \"^6.3.5\",\r\n    \"clean-css-brunch\": \">= 1.0 < 1.4\",\r\n    \"css-brunch\": \">= 1.0 < 1.4\",\r\n    \"handlebars-brunch\": \">= 1.0 < 1.4\",\r\n    \"javascript-brunch\": \">= 1.0 < 1.6\",\r\n    \"postcss-brunch\": \"^0.5.0\",\r\n    \"sass-brunch\": \"^1.9.2\",\r\n    \"uglify-js-brunch\": \">= 1.0 < 1.4\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"chai\": \"1.2.0\",\r\n    \"sinon\": \"1.4.2\",\r\n    \"sinon-chai\": \"2.1.2\"\r\n  }\r\n}\r\n```\r\n\r\n\r\n### brunch config contents\r\n```\r\nexports.config =\r\n  # Edit the next line to change default build path.\r\n  paths:\r\n    public: 'public'\r\n\r\n  plugins:\r\n    postcss:\r\n      processors: [\r\n        require('autoprefixer')(['last 8 versions'])\r\n      ]\r\n\r\n  files:\r\n    javascripts:\r\n      # Defines what file will be generated with `brunch generate`.\r\n      defaultExtension: 'js'\r\n      # Describes how files will be compiled & joined together.\r\n      # Available formats:\r\n      # * 'outputFilePath'\r\n      # * map of ('outputFilePath': /regExp that matches input path/)\r\n      # * map of ('outputFilePath': function that takes input path)\r\n      joinTo:\r\n        'javascripts/app.js': /^app/\r\n        'javascripts/vendor.js': /^vendor/\r\n        'test/javascripts/test.js': /^test(\\/|\\\\)(?!vendor)/\r\n        'test/javascripts/test-vendor.js': /^test(\\/|\\\\)(?=vendor)/\r\n      # Defines compilation order.\r\n      # `vendor` files will be compiled before other ones\r\n      # even if they are not present here.\r\n      order:\r\n        before: [\r\n          'vendor/scripts/console-helper.js',\r\n          'vendor/scripts/modernizr.custom.50279.js',\r\n          'vendor/scripts/jquery-1.8.2.min.js',\r\n          'vendor/scripts/jquery-ui.js',\r\n          'vendor/scripts/respond.min.js',\r\n          'vendor/scripts/underscore-1.4.4.js',\r\n          'vendor/scripts/backbone-1.0.0.js',\r\n          'vendor/scripts/backbone-mediator.js',\r\n          'vendor/scripts/tappable-9.9.9.js',\r\n          'vendor/scripts/jquery.hammer.js',\r\n          'vendor/scripts/masonry.pkgd.js',\r\n          'vendor/scripts/jquery.mCustomScrollbar.js',\r\n          'vendor/scripts/jquery.ui.touch-punch.js'\r\n\r\n          # Twitter Bootstrap jquery plugins\r\n          #'vendor/scripts/bootstrap/bootstrap-transition.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-alert.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-button.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-carousel.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-collapse.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-dropdown.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-modal.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-tooltip.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-popover.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-scrollspy.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-tab.js',\r\n          #'vendor/scripts/bootstrap/bootstrap-typeahed.js'\r\n        ]\r\n        after: [\r\n          'test/vendor/scripts/test-helper.js'\r\n        ]\r\n\r\n    stylesheets:\r\n      defaultExtension: 'less'\r\n      joinTo:\r\n        'stylesheets/app.css': /^(app|vendor)/\r\n        'test/stylesheets/test.css': /^test/\r\n      # moved all scss files to before\r\n      # using after was temperamental\r\n      order:\r\n       before: [\r\n         'app/styles/mixins.scss',\r\n         'app/styles/main.scss',\r\n         'app/styles/header.scss',\r\n         'app/styles/footer.scss',\r\n         'app/styles/articles.scss',\r\n         'app/styles/landing.scss',\r\n         'app/styles/search.scss',\r\n         'app/styles/gallery.scss',\r\n         'app/styles/video.scss',\r\n         'app/styles/quiz.scss',\r\n         'app/styles/explore.scss',\r\n         'app/styles/hover.scss',\r\n         'app/styles/ie.scss'\r\n       ]\r\n       after: [\r\n       ]\r\n  # Updated to sass-brunch@1.9\r\n  # Added new path for sass files.\r\n      defaultExtension: 'scss'\r\n      joinTo:\r\n        'stylesheets/app.css': /^app\\/styles/\r\n        'stylesheets/global.css': /^app\\/sass\\/config/\r\n\r\n    templates:\r\n      defaultExtension: 'hbs'\r\n      joinTo: 'javascripts/app.js'\r\n\r\n  # Change this if you're using something other than backbone (e.g. 'ember').\r\n  # Content of files, generated with `brunch generate` depends on the setting.\r\n  # framework: 'backbone'\r\n\r\n  # Settings of web server that will run with `brunch watch [--server]`.\r\n  # server:\r\n  #   # Path to your server node.js module.\r\n  #   # If it's commented-out, brunch will use built-in express.js server.\r\n  #   path: 'server.coffee'\r\n  #   port: 3333\r\n  #   # Run even without `--server` option?\r\n  #   run: yes\r\n\r\n```\r\n\r\nUnfortunately I am unable to create a demo app but I hope that the information above gives you enough info.\r\n"},"comment":{"url":"https://api.github.com/repos/brunch/brunch/issues/comments/223094641","html_url":"https://github.com/brunch/brunch/issues/1271#issuecomment-223094641","issue_url":"https://api.github.com/repos/brunch/brunch/issues/1271","id":223094641,"user":{"login":"superscript18","id":7308014,"avatar_url":"https://avatars.githubusercontent.com/u/7308014?v=3","gravatar_id":"","url":"https://api.github.com/users/superscript18","html_url":"https://github.com/superscript18","followers_url":"https://api.github.com/users/superscript18/followers","following_url":"https://api.github.com/users/superscript18/following{/other_user}","gists_url":"https://api.github.com/users/superscript18/gists{/gist_id}","starred_url":"https://api.github.com/users/superscript18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superscript18/subscriptions","organizations_url":"https://api.github.com/users/superscript18/orgs","repos_url":"https://api.github.com/users/superscript18/repos","events_url":"https://api.github.com/users/superscript18/events{/privacy}","received_events_url":"https://api.github.com/users/superscript18/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T19:11:12Z","updated_at":"2016-06-01T19:11:12Z","body":"Okay, I've got what I think is the same problem:  when my editor (NeoVim) is set to do non-atomic saves, simply writing onto the file, I get lots of messy problems with dependencies/etc. like @Itagiba described.  The problem appears to go away when I switch to atomic writes (write elsewhere and copy) or by setting `usePolling: true`.\r\n\r\nIt seems like maybe this issue should go upstream to paulmillr/chokidar."}}
{"actor":{"display_login":"superscript18"}}