question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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.

  1. Run ng new --package-manager pnpm test-issue
  2. 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 into node_modules ngcc_entry_points.zip
  3. 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
radarsucommented, Jul 29, 2020

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.

1reaction
petebacondarwincommented, Nov 23, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found