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

Invalid value type error keeps recurring and can't figure out why #6152

Open
jcreamer898 opened this issue Jul 25, 2018 · 12 comments
Open

Invalid value type error keeps recurring and can't figure out why #6152

jcreamer898 opened this issue Jul 25, 2018 · 12 comments
Assignees
Labels

Comments

@jcreamer898
Copy link

jcreamer898 commented Jul 25, 2018

Do you want to request a feature or report a bug?
report a bug

What is the current behavior?
error An unexpected error occurred: "Invalid value type 7803:0 in /srv/core/js/yarn.lock".

If the current behavior is a bug, please provide the steps to reproduce.

Even after an rm -rf yarn.lock followed by a full yarn, running yarn again after that keeps getting the invalid value type error

What is the expected behavior?
I expect yarn install to work without an error on startup

Please mention your node.js, yarn and operating system version.
node v8.11.3, yarn 1.7.0, macOS

Here's the error stack trace and yarn.lock...
https://gist.github.com/jcreamer898/865c85b989c65412bb32bc7a4f7d2f35

@ghost ghost assigned torifat Jul 25, 2018
@ghost ghost added the triaged label Jul 25, 2018
@jcreamer898
Copy link
Author

More information...

This error cropped up after I had a yarn.lock conflict. In the middle of a rebase I rm -rf yarn.lock and kept yarn-ing until the rebase was over.

So it's like this is only happening on a fresh yarn.lock.

@kylezeeuwen
Copy link

I accidentally added a random "Z" in the yarn.lock and got this exact error. The error pointed at line 51, but the Z was way down in the middle of the file. Checking for typos is a good first step if you get this error.

@kwelch
Copy link
Contributor

kwelch commented Dec 24, 2018

This has been not from a rouge character from what I can tell. We are running yarn on a MBP and some are also running it within a Linux container. We are getting odd differences depending on where it is ran. Mainly, related to the resolved urls. There are cases where we get lock updates when we would not have expected to get them (aka no package.json change). Typically the lock file issue throwing invalid type does not display until the second install specifically after odd lock update.

Example:

-resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59"
+resolved ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59

Not really sure entirely on this, but my theory is that we are getting odd yarn differences between or containers and local machines. Is this something that foreseeably work, or are we operating in a false case.

One thing that I have found to work pretty consistently, if I can find a commit where we don't have a lock issue (on second install). Then reverting just the lock (git co -- yarn.lock) file to that commit and then running yarn it works.

Here is the error log I have from my last attempt.
https://gist.github.com/kwelch/6f85ffa439f3edc255ddc285a565abe0

@TooTallNate
Copy link

I am experiencing this as well. Is there any explanation?

@matthewdowns-eb
Copy link

I had this happen a few times. I was able to get it to start building a good yarn.lock again by checking out the latest from master:

git checkout origin/master -- yarn.lock
yarn install

@TooTallNate
Copy link

Thanks @matthewdowns-eb. That's more of a workaround though. I'm more interested in why it's happening.

@kwelch
Copy link
Contributor

kwelch commented Mar 5, 2019

@TooTallNate, Are you running within docker containers? We have moved our solution out of containers and it start working again. That being said I don't believe we have had this issue recently (even within containers).

@jcreamer898
Copy link
Author

jcreamer898 commented Apr 30, 2019

We still see this every now and then... even in jest yarn 1.13.0.

updated 5/5/19 (duh)

@kwelch
Copy link
Contributor

kwelch commented Apr 30, 2019

Yarn 1.13.0

@Shehryar-khan
Copy link

I had this happen a few times. I was able to get it to start building a good yarn.lock again by checking out the latest from master:

git checkout origin/master -- yarn.lock
yarn install

Well this worked for me after being stuck at it for two days.
Tried deleting the yarn.lock file and node_modules folder but it then gave alot of package errors when running the project.
Also tried changing the node version.
The solution which worked is this

Thanks for the solution.

@Alkhatri77
Copy link

Help my please

@Shehryar-khan
Copy link

Help my please

Are you still having the issue ?

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

No branches or pull requests

9 participants