Skip to content

2.0.0 Error: Path must be a string. Received undefined #115

@sarendipitee

Description

@sarendipitee

I consistently receive this error in every project that I've upgraded to 2.0.0:

ERROR in ./~/css-loader!./~/stylus-loader!src/styles.styl
Module build failed: TypeError: src/styles.styl:87:1
   83|     .dropdown
   84|         position fixed
   85|         left -9999px
   86|         z-index 500
   87|
-------^

Path must be a string. Received undefined

  at assertPath (path.js:7:11)
  at extname (path.js:1429:5)
  at new SourceMapper (./node_modules/stylus/lib/visitor/sourcemapper.js:41:7)
  at Renderer.render (./node_modules/stylus/lib/renderer.js:94:9)
  at ./node_modules/stylus-loader/index.js:149:12
  at tryCatchReject (./node_modules/when/lib/makePromise.js:840:30)
  at runContinuation1 (./node_modules/when/lib/makePromise.js:799:4)
  at Fulfilled.when (./node_modules/when/lib/makePromise.js:590:4)
  at Pending.run (./node_modules/when/lib/makePromise.js:481:13)
  at Scheduler._drain (./node_modules/when/lib/Scheduler.js:62:19)
  at Scheduler.drain (./node_modules/when/lib/Scheduler.js:27:9)
  at _combinedTickCallback (internal/process/next_tick.js:67:7)
  at process._tickCallback (internal/process/next_tick.js:98:9)

Doesn't matter what file. Happens on first stylus file it tries to load and aborts.

Webpack.config.js:

module: {
        loaders: [
            {test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader'},
        ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions