yarn
yarn copied to clipboard
error An unexpected error occurred: "Invalid number of spaces".
Yarn version: 1.5.1
Do you want to request a feature or report a bug?
bug
What is the current behavior? error An unexpected error occurred: "Invalid number of spaces".
If the current behavior is a bug, please provide the steps to reproduce.
error during yarn install on window 10What is the expected behavior? Install packages
Please mention your node.js, yarn and operating system version. **Yarn version: 1.5.1
Node version: 9.3.0
Platform: win32 x64**
----------------- More Info -----------
Trace:
TypeError: Invalid number of spaces
at tokenise (D:\Installs\Yarn\lib\cli.js:61849:17)
at tokenise.next (
---------------------- cli -------------------------
You probably have an invalid lockfile or npmrc.
What does the invalid lockfile or npmrc mean and how can i resolve this?
This even happens when i do below
yarn init
I get
λ yarn init yarn init v1.5.1 error An unexpected error occurred: "Invalid number of spaces". info If you think this is a bug, please open a bug report with the information provided in "E:\PROJECTS\\myApp\yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/init for documentation about this command.
attached _yarn-error.log yarn-error.log
_
I'm experiencing the same issue! Is there a fix or workaround for this?
I managed to get this working by deleting yarn.lock file and running yarn install
Why can't yarn tell me which line has this problem? I get the yarn-error.log, it has the whole package.json and the whole yarn.lock file in there, but nothing about the actual error that occured.
I managed to get this working by deleting yarn.lock file and running
yarn install
Thanks! That seem to do the trick!
The issue occurs when the is some extra space in any particular line for yarn.lock file. A formatter for lock file will resolve this issue if you don't want to delete the lock file.
The issue can occurs when the is some extra space in your .yarnrc file too
@ab-rnjn do you recommend any? prettier tells me that it can't format plaintext
Remove the yarn.lock and install again, it can resolve your problem.