Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[QUESTION] npm install error #531

Closed
huifer opened this issue Nov 28, 2019 · 12 comments
Closed

[QUESTION] npm install error #531

huifer opened this issue Nov 28, 2019 · 12 comments

Comments

@huifer
Copy link

huifer commented Nov 28, 2019

I want to install yarn npm install -g yarn
console out

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF71746124F napi_wrap+124431
 2: 00007FF717402A06 v8::base::CPU::has_sse+34502
 3: 00007FF7174036C6 v8::base::CPU::has_sse+37766
 4: 00007FF717C082DE v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF717BF0321 v8::SharedArrayBuffer::Externalize+833
 6: 00007FF717ABDBEC v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436
 7: 00007FF717AC8F90 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312
 8: 00007FF717AC5AC4 v8::internal::Heap::PageFlagsAreConsistent+3204
 9: 00007FF717ABB353 v8::internal::Heap::CollectGarbage+1283
10: 00007FF717ABDD3A v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1770

What should I do, help me

@ljharb
Copy link
Contributor

ljharb commented Nov 28, 2019

What version of node?

@huifer
Copy link
Author

huifer commented Nov 28, 2019

What version of node?

node version : 12.13.1

@DanielRuf
Copy link

Yarn should not be installed this way.

@ljharb
Copy link
Contributor

ljharb commented Dec 8, 2019

Why not? It’s one of the supported install methods, and my preference (as opposed to using brew or some other non-node installation method).

@DanielRuf
Copy link

This way is not recommended anymore afaik.

@ljharb
Copy link
Contributor

ljharb commented Dec 8, 2019

It still shouldn’t heap dump; if it wasn’t recommended they wouldn’t be publishing new undeprecated yarn versions on npm.

@DanielRuf
Copy link

One of the reasons is the integrity (checking the signature using the GPG key) for example. Another problem might be caching.

Anyway, this looks more like an issue with NodeJS itself and native modules.

Is there more output?

@DanielRuf
Copy link

Install via npm
Note: Installation of Yarn via npm is generally not recommended. When installing Yarn with Node-based package managers, the package is not signed, and the only integrity check performed is a basic SHA1 hash, which is a security risk when installing system-wide apps.

For these reasons, it is highly recommended that you install Yarn through the installation method best suited to your operating system.

Not recommended doesn't mean that they stop publishing on npmjs.

We need more of the full output before and after this error.

And it's probably better in the issue tracker of yarn.

@ljharb
Copy link
Contributor

ljharb commented Dec 8, 2019

If it errors during npm install, it’s an npm problem; if during running yarn, then it’s not an npm problem - @huifer when does this output occur?

@huifer
Copy link
Author

huifer commented Dec 9, 2019

If it errors during npm install, it’s an npm problem; if during running yarn, then it’s not an npm problem - @huifer when does this output occur?

after execution npm install -g yarn .

@huifer
Copy link
Author

huifer commented Dec 9, 2019

I deleted the following files node_cache, node_global , then execution npm install -g yarn . I succeeded. thanks for everybody

C:\Users\Administrator>npm install -g yarn
C:\Users\Administrator\AppData\Roaming\npm\yarnpkg -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js
C:\Users\Administrator\AppData\Roaming\npm\yarn -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js
+ yarn@1.21.0
added 1 package in 4.007s

@DanielRuf
Copy link

Ok then please close this issue if it is resolved.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants