Skip to content

yarn --pnp fails to install node-sass because of missing mkdirpΒ #6613

@tbassetto

Description

@tbassetto

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Trying to use PnP on a repo already using yarn and workspaces. It fails because of sass and mkdipr:

yarn --pnp
yarn install v1.12.1
[1/5] πŸ”  Resolving packages...
[2/5] 🚚  Fetching packages...
[3/5] πŸ”—  Linking dependencies...
warning " > [email protected]" has unmet peer dependency "babel-core@6".
warning " > [email protected]" has unmet peer dependency "webpack@2 || 3 || 4".
warning "workspace-aggregator-24aceb9d-ff70-4cde-91dd-fbde71f45ea7 > [REDACTED_NAME]> [email protected]" has incorrect peer dependency "redux@^3.5.2".
warning "workspace-aggregator-24aceb9d-ff70-4cde-91dd-fbde71f45ea7 > [REDACTED_NAME] > [email protected]" has unmet peer dependency "react-router@^4.3.1".
[5/5] πŸ“ƒ  Building fresh packages...
[1/4] β‘€ fsevents
[2/4] β‘€ node-sass
[3/4] β‘€ dtrace-provider
error [REDACTED_ABSOLUTE_PATH]/js/.pnp/unplugged/npm-node-sass-4.9.2-5e63fe6bd0f2ae3ac9d6c14ede8620e2b8bdb437/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: [REDACTED_ABSOLUTE_PATH]/js/.pnp/unplugged/npm-node-sass-4.9.2-5e63fe6bd0f2ae3ac9d6c14ede8620e2b8bdb437/node_modules/node-sass
Output:
internal/modules/cjs/loader.js:582
    throw err;
    ^

Error: Cannot find module 'mkdirp'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> ([REDACTED_ABSOLUTE_PATH]/js/.pnp/unplugged/npm-node-sass-4.9.2-5e63fe6bd0f2ae3ac9d6c14ede8620e2b8bdb437/node_modules/node-sass/scripts/install.js:7:11)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)

If the current behavior is a bug, please provide the steps to reproduce.
It's unclear to me who is at fault, yarn --pnp, node-sass or mkdirp.

What is the expected behavior?
yarn pnp set up correctly for the root repo and all its workspaces.

Please mention your node.js, yarn and operating system version.

  • Node.js LTS v10.13.0
  • yarn 1.12.1
  • macOS 10.14

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions