node_modules/__ngcc_entry_points__.json causes issues with `pnpm install`
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/....β@angular/compilerβ: β^10.0.3β
Is this a regression?
Yes, the previous version in which this bug was not present was: Angular 8. I didn't try Angular 9.It worked before __ngcc_entry_points__.json
was added to node_modules
so Iβd say yes.
Description
Under some circumstances Angulars ngcc create a file node_modules/__ngcc_entry_points__.json
, this file conflicts with the package manager pnpm
.
π¬ Minimal Reproduction
You need to have pnpm
installed as package manager.
- Run
ng new --package-manager pnpm test-issue
- As I couldnβt find a way to get the
node_modules/__ngcc_entry_points__.json
generated in this test project, simply put this sample__ngcc_entry_points__.json
intonode_modules
ngcc_entry_points.zip - Run
pnpm install
π₯ Exception or Error
βERRORβ "./test-issue/node_modules/__ngcc_entry_points__.json" is not a directory
at tryReadProjectManifest ../../../../../../../AppData/Roaming/npm/node_modules/pnpm/lib/node_modules/@pnpm/read-project-manifest/lib/index.js:89 const err = new Error(`"β¦
at async readProjectManifest ../../../../../../../AppData/Roaming/npm/node_modules/pnpm/lib/node_modules/@pnpm/read-project-manifest/lib/index.js:17 const result = await tryβ¦
at readProjectManifestOnly ../../../../../../../AppData/Roaming/npm/node_modules/pnpm/lib/node_modules/@pnpm/read-project-manifest/lib/index.js:25 const { manifest } = awaβ¦
at async safeReadProjectManβ¦ ../../../../../../../AppData/Roaming/npm/node_modules/pnpm/lib/node_modules/@pnpm/link-bins/lib/index.js:126 return await read_projecβ¦
at async getPackageBins ../../../../../../../AppData/Roaming/npm/node_modules/pnpm/lib/node_modules/@pnpm/link-bins/lib/index.js:76 ? await safeReadProjectMβ¦
at all
at default ../../../../../../../AppData/Roaming/npm/node_modules/pnpm/lib/node_modules/@pnpm/link-bins/lib/index.js:30 const allCmds = R.unnestβ¦
at all
at default ../../../../../../../AppData/Roaming/npm/node_modules/pnpm/lib/node_modules/@pnpm/headless/lib/index.js:210 await Promise.all(opts.pβ¦
at async _install ../../../../../../../AppData/Roaming/npm/node_modules/pnpm/lib/node_modules/supi/lib/install/index.js:97 await headless_1.defaultβ¦
π Your Environment
Angular Version:
There seems to be an issue with the version detection when pnpm
is used
Angular CLI: 10.0.1
Node: 14.4.0
OS: win32 x64
Angular: 10.0.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
---------------------------------------------------------
@angular-devkit/architect <error>
@angular-devkit/build-angular 0.1000.1
@angular-devkit/core <error>
@angular-devkit/schematics <error>
@angular/cli 10.0.1
@schematics/angular <error>
@schematics/update <error>
rxjs 6.5.5
typescript 3.9.6
Anything else relevant? no
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Error Codes | pnpm
This error happens when installation cannot be performed without changes to the lockfile. This might happen in a CI environment if someone has...
Read more >package.json | pnpm
package.json. The manifest file of a package. It contains all the package's metadata, including dependencies, title, author, et cetera.
Read more >pnpm install
pnpm install is used to install all dependencies for a project. In a CI environment, installation fails if a lockfile is present but...
Read more >Frequently Asked Questions | pnpm
Early versions of npm had issues because of nesting all node_modules ... is to add iterall as a dependency to our project's package.json...
Read more >.npmrc | pnpm
This makes unlisted dependencies accessible to all packages inside ... the package.json dependencies directive, a headless installation is performed.
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
pnpm assumes node_modules contains only directories. I believe this assumption is correct.
ngcc compiler adds ngcc_entry_points.json to node_modules directly. I believe that file should be generated under some dot-directory (like
.angular
,.ng
or.ngcc
) and not bloating node_modules with json file.This should be solved by the ng-linker being developed to replace ngcc. Please follow along with the progress here: https://github.com/orgs/angular/projects/2