brunch / stylus-brunch

Adds Stylus support to Brunch
MIT License
21 stars 2 forks source link

stylus-brunch freeze brunch #63

Open etroynov opened 7 years ago

etroynov commented 7 years ago

Hi,

When i try start brunch, i see error:

(node:5902) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Path must be a string. Received undefined
(node:5902) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
06 Apr 16:25:55 - info: compiling
06 Apr 16:25:59 - info: compiling.
06 Apr 16:26:03 - info: compiling..

my brunch-config.js

module.exports = {
  files: {
 javascripts: {
      joinTo: "js/app.js"

      // To use a separate vendor.js bundle, specify two files path
      // http://brunch.io/docs/config#-files-
      // joinTo: {
      //  "js/app.js": /^(web\/static\/js)/,
      //  "js/vendor.js": /^(web\/static\/vendor)|(deps)/
      // }
      //
      // To change the order of concatenation of files, explicitly mention here
      // order: {
      //   before: [
      //     "web/static/vendor/js/jquery-2.1.1.js",
      //     "web/static/vendor/js/bootstrap.min.js"
      //   ]
      // }
    },
    stylesheets: {
      joinTo: 'css/app.css'
    }
  },

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

  paths: {
    watched: [
      '/web/static'
    ],

    public: '/priv/static'
  },

  sourceMaps: false
}; 

package.json:

{
  "repository": {},
  "license": "MIT",
  "scripts": {
    "deploy": "brunch build --production",
    "watch": "brunch watch --stdin"
  },
  "dependencies": {
    "brunch-typescript": "^2.1.0",
    "phoenix": "file:deps/phoenix",
    "phoenix_html": "file:deps/phoenix_html"
  },
  "devDependencies": {
    "babel-brunch": "~6.0.0",
    "brunch": "2.7.4",
    "clean-css-brunch": "~2.0.0",
    "css-brunch": "~2.0.0",
    "stylus-brunch": "^2.10.0",
    "typescript-brunch": "^2.3.0",
    "javascript-brunch": "~2.0.0",
    "uglify-js-brunch": "~2.0.1"
  }
}

Environment:

P.S When i remove or replace sylus ( as example LESS ), all works fine.

denysdovhan commented 7 years ago

@etroynov thanks for reaching us out! Trying to figure out what is the cause of your issue.

denysdovhan commented 7 years ago

Take a look at this:

… … … TypeError: Path must be a string. Received undefined

Probably, you're passing an undefined in one of path's methods. Please check your paths.

denysdovhan commented 7 years ago

@etroynov hey, I've created a repo, but can't reproduce your problem. Can you, please, change this repo to make it possible to reproduce this issue. Thanks.

etroynov commented 7 years ago

thanks for answers, i try reproduce this problem by using this repo.

etroynov commented 7 years ago

I reproduce problem in this repo: https://github.com/etroynov/stylus-brunch-issue-63

etroynov commented 7 years ago

I update config, нor some reason he does not see path:

brunch:pipeline Dependencies web/static/app.styl @ StylusCompiler +84ms
(node:20341) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Path must be a string. Received undefined
etroynov commented 7 years ago

any news?

denysdovhan commented 7 years ago

Thanks for repo! Currently, I'm involved in other issues. Gonna come back asap. I've saved that for future.

timnew commented 7 years ago

Same here. Got unhandled rejected promise when phoenix server started

(node:54115) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Path must be a string. Received undefined

denysdovhan commented 7 years ago

I reproduce problem in this repo: https://github.com/etroynov/stylus-brunch-issue-63

@timnew does this repo reproduce your problem too?

Toinne commented 7 years ago

The problem is solved if you update your brunch version in package.json to 2.10.9. Or probably if you use an older version of stylus-brunch.

It seems some changes were made between versions to the getDependencies call in older versions it doesn't pass a file as parameter but data, path etc. .