Skip to content

TypeError: Expected cwd to be of type string but received type undefined #265

Description

@bartdelange

When executing any cli command it fails and gives the error below, this however does work if I use yarn. (has also been referenced here: #264)

Example command (the style.css is just an empty file):

"start": "postcss --use autoprefixer -o ./style.css ./style.css"

Stacktrace:

TypeError: Expected `cwd` to be of type `string` but received type `undefined`
    at module.exports (/path/to/project/node_modules/dir-glob/index.js:44:25)
    at globDirs (/path/to/project/node_modules/globby/index.js:58:9)
    at getPattern (/path/to/project/node_modules/globby/index.js:61:64)
    at Promise.all.globTasks.map.task (/path/to/project/node_modules/globby/index.js:72:69)
    at Array.map (<anonymous>)
    at module.exports (/path/to/project/node_modules/globby/index.js:72:41)
    at Promise.resolve.then (/path/to/project/node_modules/postcss-cli/index.js:58:14)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
    at findNodeScript.then.existing (/[user]/.nvm/versions/node/v10.12.0/lib/node_modules/npm/node_modules/libnpx/index.js:268:14)

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