-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[BUG] Cannot destructure property 'name' of '.for' as it is undefined. #6006
Comments
I'm running into the same exact issue - however this happens when I'm trying to link the package though (running |
I had the same problem when trying to install my project with I fixed it by providing |
@papaj-na-wrotkach can u be more specific, pls? 🥹 Because I started coding using Laravel this August, then I started and finished a React project. After completing the React project, I returned to work on the Laravel project, but I can't use 'npm run dev' because I used Vite on both projects. Then, I tried to update npm to fix the issue, but I ended up here |
Sorry, it was a long time ago and I don't remember. I remember having problems with
I remember that after setting the property |
Thank you, such an obvious fix 😅 |
If package name has been already provided but error hasn't gone i recommend restart console or terminal and run |
In my case it was due to I started using |
This can also happen due to the conflicts in the |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Disclaimer:
Today when I wanted to get started coding, I created a brand new Laravel project and tried using npm. npm then informed me that a new version was out and I should upgrade, so I did:
npm install -g npm@latest
And got provided with
v9.2.0
. Before that I was using npm 8.After the upgrade I wanted to install my packages so I did:
npm install
Then I got hit by this:
npm ERR! Cannot destructure property 'name' of '.for' as it is undefined.
The full error log is as follows:
Expected Behavior
I would expect that the dependencies just installed because it was a clean fresh package.json with just a few devDependecies..
I tried then to downgrade to v8, also didn't work anymore.
I tried then to downgrade to v7, this again worked but gave some errors due to too old of an version.
Steps To Reproduce
package.json
, or whether there is a package-lock or node_modules folderCannot destructure property 'name' of '.for' as it is undefined.
Environment
npm config ls:
The text was updated successfully, but these errors were encountered: