Skip to content

Expected cwd to be of type string but received type undefined #264

Description

@Marzdor

I've been using the same script and config for my postcss now all of a sudden like maybe 30min ago I always get this error and I am not sure why.

"postcss": "postcss --config postcss.config.js -w src/css/main.css -o src/css/index.css"

/// config
module.exports = () => ({
  plugins: {
    autoprefixer: {
      browsers: "> 5%"
    },
    "postcss-import": {},
    "postcss-mixins": {},
    "postcss-nested": {},
    "postcss-simple-vars": {}
  }
});

$ npm run postcss

> brodericks-compendium@1.0.0 postcss A:\Documents\web\brodericks-compendium
> npm run postcss --prefix client

> client@0.1.0 postcss A:\Documents\web\brodericks-compendium\client
> postcss --config postcss.config.js -w src/css/main.css -o src/css/index.css

TypeError: Expected `cwd` to be of type `string` but received type `undefined`
    at module.exports (A:\Documents\web\brodericks-compendium\client\node_modules\dir-glob\index.js:44:25)
    at globDirs (A:\Documents\web\brodericks-compendium\client\node_modules\globby\index.js:58:9)
    at getPattern (A:\Documents\web\brodericks-compendium\client\node_modules\globby\index.js:61:64)
    at Promise.all.globTasks.map.task (A:\Documents\web\brodericks-compendium\client\node_modules\globby\index.js:72:69)
    at Array.map (<anonymous>)
    at module.exports (A:\Documents\web\brodericks-compendium\client\node_modules\globby\index.js:72:41)
    at Promise.resolve.then (A:\Documents\web\brodericks-compendium\client\node_modules\postcss-cli\index.js:58:14)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@0.1.0 postcss: `postcss --config postcss.config.js -w src/css/main.css -o src/css/index.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@0.1.0 postcss script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Marzdor\AppData\Roaming\npm-cache\_logs\2019-01-11T01_35_10_036Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! brodericks-compendium@1.0.0 postcss: `npm run postcss --prefix client`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the brodericks-compendium@1.0.0 postcss script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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