Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

NPM install fails with 'edgesout' warning #3998

Open
baufometic opened this issue May 7, 2023 · 24 comments
Open

NPM install fails with 'edgesout' warning #3998

baufometic opened this issue May 7, 2023 · 24 comments

Comments

@baufometic
Copy link

Node 18.15.0
NPM 9.6.7
Ubuntu Linux
VS Code
Regular Next JS project

Install works fine with an older version of SC i.e. npm i styled-components@5.3.1
Installed SC a few hours ago in a copy of this repo, so it must be the latest release.

Steps to reproduce

npm i styled-components

@Sambhav399
Copy link

Sambhav399 commented May 7, 2023

It's having an issue. I tried with upgrading and downgrading node and npm versions it always shows an error.

To Fix this use latest LTS v5.3.10 version of styled-components

For projects using JS/JSX(JavaScript)
npm i -D styled-components@5.3.10

For projects using TS/TSX(TypeScript)
npm i -D styled-components@5.3.10 @types/styled-components

@nirzafran
Copy link

It's having an issue. I tried with upgrading and downgrading node and npm versions it always shows an error.

To Fix this use specifically 5.3.10 version of styled-components

For projects using JS/JSX(JavaScript) npm i -D styled-components@5.3.10

For projects using TS/TSX(TypeScript) npm i -D styled-components@5.3.10 @types/styled-components

thx!

@dougfbf
Copy link

dougfbf commented May 7, 2023

I was having the same issue.
It worked when I tried the following: npm install styled-components@latest

@CodyMan0
Copy link

CodyMan0 commented May 8, 2023

Thanks~ I was having the same issue as well!

@MiRoro2
Copy link

MiRoro2 commented May 8, 2023

i was having the same problem... thanks!

@kode-neko
Copy link

Hello Everyone! ✋

Phew... I'm not the only one with this problem. For the moment the only and secure solution is use a previous version. In my case y decided to downgrade @5.3.10. When the new version 6 is stable, I will use it.

npm install "styled-components@5.3.10"

It could be usefull publish the output terminal 💻

$ npm install styled-components
npm ERR! Cannot read properties of null (reading 'edgesOut')

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\koden\AppData\Local\npm-cache\_logs\2023-05-08T12_55_24_726Z-debug-0.log

Have a nice day!

@buddhika-ranasinghe
Copy link

Having the same issue

npm install --save styled-components@5.3.10

Thanks, @kode-neko and Everyone else.
Downgraded to 5.3.10 for now.

@CodePhilanthropist
Copy link

Solution for styled-components installation issue (v6.0.0-rc.1)

Hello everyone,

If you have encountered issues installing styled-components recently, it might be due to the newly published unstable version 6.0.0-rc.1, published 2 days ago. Here's the solution to this problem.

To install the latest unstable version (v6.0.0-rc.1) of styled-components, run the following command:
npm install styled-components@latest

However, if you prefer to use a stable version (v5.x.x) instead of the unstable version, you can install it using the following command:
npm install styled-components@5
This will ensure you're using the stable version 5 of styled-components and avoid potential issues related to the unstable release.

@deniyaldanidan
Copy link

I'm having same issue. npm i styled-components doesnt work. but npm i styled-components@5 works.

Thanks.

@shazinet
Copy link

shazinet commented May 11, 2023

It's having an issue. I tried with upgrading and downgrading node and npm versions it always shows an error.

To Fix this use latest LTS v5.3.10 version of styled-components

For projects using JS/JSX(JavaScript) npm i -D styled-components@5.3.10

For projects using TS/TSX(TypeScript) npm i -D styled-components@5.3.10 @types/styled-components

What about using latest keyword instead of using the exact version?
npm i -D styled-components@latest

@Sambhav399
Copy link

It's having an issue. I tried with upgrading and downgrading node and npm versions it always shows an error.
To Fix this use latest LTS v5.3.10 version of styled-components
For projects using JS/JSX(JavaScript) npm i -D styled-components@5.3.10
For projects using TS/TSX(TypeScript) npm i -D styled-components@5.3.10 @types/styled-components

What about using latest keyword instead of using the exact version? npm i -D styled-components@latest

At the time of that comment it was latest LTS version. So I mentioned it

@mitranjaykrishna
Copy link

Yh same using this it solved
npm install styled-components@latest

@mohamuhsin
Copy link

mohamuhsin commented May 21, 2023

got solved by npm install styled-components@latest, shukran.

@jelmd
Copy link

jelmd commented May 22, 2023

According to the log it seems npm is broken, not?

72 timing command:update Completed in 627ms
73 verbose stack TypeError: Cannot read properties of null (reading 'edgesOut')
73 verbose stack     at [loadPeerSet] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1307:38)
73 verbose stack     at async [loadPeerSet] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1315:11)
73 verbose stack     at async [buildDepStep] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:929:11)
73 verbose stack     at async Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:207:7)
73 verbose stack     at async Promise.all (index 1)
73 verbose stack     at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:159:5)
73 verbose stack     at async Update.exec (/usr/lib/node_modules/npm/lib/commands/update.js:64:5)
73 verbose stack     at async module.exports (/usr/lib/node_modules/npm/lib/cli.js:134:5)
74 verbose cwd ...

@deepbodo
Copy link

Thanks u saved me! I felt useless without it

@DavonWhitworth
Copy link

I was having the same issue. It worked when I tried the following: npm install styled-components@latest

This worked for me. Thanks

@IskraI
Copy link

IskraI commented May 25, 2023

Thanks you helped me!

@fresonn
Copy link

fresonn commented May 25, 2023

Just use: npm i styled-components@5

@chaitanya-000
Copy link

None of the above solutions worked for me.
Tried - npm install styled-components@5 --force.
It worked.
But make sure that you make a test styled component and create a build as soon as you use this. Chances are it may work during development but may crash in build or production

@wizzy-design
Copy link

Phew, thanks for all the solutions guys

@Patrikur
Copy link

I was having the same issue. It worked when I tried the following: npm install styled-components@latest

This worked for me. Thanks

Can confirm this for my Next.js 13 project.

@haneenmahd
Copy link

I faced the same issue with my Next 13 project.

But I could install it successfully by running:

npm i styled-components@latest

@george-thomas-hill
Copy link

Subscribing.

@jelmd
Copy link

jelmd commented Jun 23, 2023

Because my project does not depend on styled-components, I prefer to patch the bogus npm (Q&D):

--- /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js.orig	2023-04-12 05:45:24.000000000 +0200
+++ /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js	2023-05-24 18:15:49.699840640 +0200
@@ -1304,6 +1304,11 @@
         continue
       }
 
+		var x = node.parent.edgesOut.get(edge.name);
+		//console.log('\nedge.name=\n', edge.name, '\n', x );
+		if (!x)
+			continue;
+
       const parentEdge = node.parent.edgesOut.get(edge.name)
       const { isProjectRoot, isWorkspace } = node.parent.sourceReference
       const isMine = isProjectRoot || isWorkspace

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

No branches or pull requests