[Bug] yarn pnpify fails with space character in path
See original GitHub issue- I’d be willing to implement a fix
Describe the bug
yarn pnpify
fails when there is a space in the path:
C:\akrawitz\Research - Test\mypackage>yarn pnpify remark README.md
C:\akrawitz\Research - Test\mypackage\.pnp.js:32402
throw firstError;
^
Error: Couldn't find a suitable Node resolution for the specified unqualified path
Source path: /C:/akrawitz/Research
Rejected resolution: /C:/akrawitz/Research
Rejected resolution: /C:/akrawitz/Research.js
Rejected resolution: /C:/akrawitz/Research.json
Rejected resolution: /C:/akrawitz/Research.node
Require stack:
- internal/preload
at Object.makeError (C:\akrawitz\Research - Test\mypackage\.pnp.js:24113:24)
at resolveUnqualified (C:\akrawitz\Research - Test\mypackage\.pnp.js:33069:29)
at resolveRequest (C:\akrawitz\Research - Test\mypackage\.pnp.js:33094:14)
at Object.resolveRequest (C:\akrawitz\Research - Test\mypackage\.pnp.js:33156:26)
at Function.module_1.Module._resolveFilename (C:\akrawitz\Research - Test\mypackage\.pnp.js:32385:34)
at Function.module_1.Module._load (C:\akrawitz\Research - Test\mypackage\.pnp.js:32270:40)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at Module._preloadModules (internal/modules/cjs/loader.js:1296:12)
at loadPreloadModules (internal/bootstrap/pre_execution.js:448:5)
at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:71:3) {
code: 'MODULE_NOT_FOUND',
pnpCode: 'QUALIFIED_PATH_RESOLUTION_FAILED',
data: {
unqualifiedPath: '/C:/akrawitz/Research',
request: '/C:/akrawitz/Research',
issuer: '/C:/akrawitz/Research - Test/mypackage/'
},
requireStack: [ 'internal/preload' ]
}
C:\akrawitz\Research - Test\mypackage>
To Reproduce
Run yarn pnpify
in a package when there is a space in the name of one of the containing directories. Note that the troublesome directory name is outside of the package.
Environment if relevant (please complete the following information):
- OS: Windows 10
- Node version: 13.9.0
- Yarn version: 2.0.0-rc.29
Additional context
For better or worse, spaces are common in Windows directory names (e.g. ‘Program Files’).
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to configure VSCode to run Yarn 2 (with PnP) powered ...
I had this problem last night while migrating to Yarn v2 and using PnP. Make sure that after running yarn dlx @yarnpkg/sdks vscode...
Read more >@yarnpkg/pnp | Yarn - Package Manager
Yarn will now allow relative paths inside the workspace: protocol to start with ./; Yarn will now show the actual error when it...
Read more >Error 1324 The Folder Path Contains an Invalid Character ...
Are you having any problems when installing a program? Each time you try, you receive the error message: Error 1324 The Folder Path...
Read more >yarn command not found
You need to add the yarn global directory into your path but first to know the ... This error comes up after I...
Read more >REST Client Extension for Visual Studio Code - Morioh
You can also specify file path to use as a body, which starts with < , the file path(whitespaces should be preserved) can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Opened PR with the fix: #1211
@regevbr Thanks for the steps, I can reproduce it now. Seems it has nothing to do with
pnpify
tool though. Looking…