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
error An unexpected error occurred: "Invalid number of spaces". #5613
Comments
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 attached _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 |
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. |
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. |
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 ()
at Parser.next (D:\Installs\Yarn\lib\cli.js:61961:28)
at Parser.parse (D:\Installs\Yarn\lib\cli.js:62009:30)
at parse (D:\Installs\Yarn\lib\cli.js:62182:17)
at module.exports.exports.default (D:\Installs\Yarn\lib\cli.js:61746:96)
at YarnRegistry. (D:\Installs\Yarn\lib\cli.js:92468:64)
at Generator.next ()
at step (D:\Installs\Yarn\lib\cli.js:98:30)
at D:\Installs\Yarn\lib\cli.js:109:13
---------------------- cli -------------------------
cli.zip
The text was updated successfully, but these errors were encountered: