"yarn prepare" failure in fresh clone
Closed this issue · 2 comments
After cloning and running yarn
, yarn prepare
throws the following error:
~/build/ahoopen-monorepo$ yarn prepare
yarn run v1.22.10
$ node ./configure-references.js
(node:30908) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token : in JSON at position 17
at JSON.parse (<anonymous>)
at /home/user/build/ahoopen-monorepo/configure-references.js:26:29
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:30908) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:30908) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Done in 0.21s.
Running node ./configure-references.js
works fine, although none of the packages have dependencies on other packages.
This is the output of yarn workspaces info --json
, which looks fine to me so your guess is as good as mine:
{
"@ahoopen/core": {
"location": "packages/core",
"workspaceDependencies": [],
"mismatchedWorkspaceDependencies": []
},
"@ahoopen/utils": {
"location": "packages/utils",
"workspaceDependencies": [],
"mismatchedWorkspaceDependencies": []
},
"@ahoopen/web": {
"location": "packages/web",
"workspaceDependencies": [],
"mismatchedWorkspaceDependencies": []
}
}
Is this repo up to date with the blog articles?
Edit: never mind, I see that the series of articles is not completed.
Hi @parkerault
It's important to have the latest version of yarn. And you don't have to run yarn prepare
yourself. It will run automatically if you call yarn
. The idea is, that when you add new dependencies to the mono repo this will run after the install. Thus keeping your TypeScript tsconfig up to date :)
If you have any questions, feel free to ask them.
Hi, I'm getting the same error, I do yarn install or lerna bootstrap and I get the error, what can I do? I have yarn updated