yarnpkg / yarnpkg/berry

[Bug] Some packages cause to fail finding .pnp.js in unicode path

Open
#781 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug upholded
Dominant language
TypeScript
Stars
8.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

  • I'd be willing to implement a fix

Describe the bug

When you run yarn on the project with an unicode path, with this error message:

To Reproduce

{
  "dependencies": {
    "core-js": "^3.6.4"
  }
}

I couldn't find a way to reproduce the unicode path part using Sherlock, so please update this issue with automated test if available.

Screenshots

Expected behaviour Current behaviour
image image
  • The username in the screenshot was redacted since it was my real name.

I attached the error log below.

# This file contains the result of Yarn building a package (core-js@npm:3.6.4)
# Script name: postinstall

internal/modules/cjs/loader.js:895
    throw err;
    ^

Error: Cannot find module 'C:\Users\����\Projects\reproducing-2\.pnp.js'
Require stack:
- internal/preload
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:892:15)
    at Function.Module._load (internal/modules/cjs/loader.js:785:27)
    at Module.require (internal/modules/cjs/loader.js:956:19)
    at Module._preloadModules (internal/modules/cjs/loader.js:1249:12)
    at loadPreloadModules (internal/bootstrap/pre_execution.js:437:5)
    at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:63:3)
    at internal/main/eval_string.js:14:1 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'internal/preload' ]
}

Environment if relevant (please complete the following information):

  • OS: Microsoft Windows 10 Build 1909
  • Node version v13.1.0
  • Yarn version 2.0.0-rc.27

Additional context

For now I checked this error on these packages: core-js, core-js-pure, fsevents.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing yarn on Windows 10 in a path containing Unicode characters, using the provided core-js dependency and the listed Node and Yarn versions. Investigate how .pnp.js is found during package scripts, then add an automated regression test and verify that installation succeeds for the affected packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.