terraform-aws-next-js
terraform-aws-next-js copied to clipboard
Build error yarn tf-next
I am following these steps: https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/complete
- yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/complete my-app
- cd my-app
- yarn tf-next or npm run tf-nex
After getting this error-
yarn run v1.22.15
$ tf-next build
Checking out files...
Installing dependencies...
'yarn' is not recognized as an internal or external command,
operable program or batch file.
Build failed:
NowBuildError: Command "yarn install" exited with 1
at ChildProcess.
Node version: 16.13.0
Of course yarn build
command works fine.
What wrong am I doing?
Hi, looks like yarn
could not be resolved from the PATH
environment variable.
Main error message here seems to be
'yarn' is not recognized as an internal or external command, operable program or batch file.
Have you installed yarn through npm or from the msi-installer? Need to check it on my Windows machine, in the meantime here is a discussion about why this problem might happens: https://github.com/yarnpkg/yarn/issues/2504
Tried using both msi and npm global command but did not help. I am wondering why this particular command yarn tf-next
is failing but all other command such as yarn --version
works fine!
Strange, encountered the same issue on my Windows machine.
However I was able to finish the same build with npx: npx tf-next build
.
@ofhouse Facing the same issue when running tf-next build, updated all my packages and even reverted from pnpm to yarn and still no luck. Were you able to reproduce the following issue on MAC-OS by any chance?
Here's the stack trace: Couldn't find any versions for "config" that matches "workspace:*"
? Please choose a version of "config" from this list: 3.3.7
[3/5] 🚚 Fetching packages...
error @typescript-eslint/[email protected]: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "14.16.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Build failed:
NowBuildError: Command "yarn install" exited with 1
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:467:12)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
hideStackTrace: true,
code: 'BUILD_UTILS_SPAWN_1',
link: undefined,
action: undefined
}
@wcisco17 This seems so be an unrelated error because the command failed with another error message:
error @typescript-eslint/[email protected]: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "14.16.0"
error Found incompatible module.
You should able to fix the issue by upgrading the Node.js version installed on your machine.
You can check the currently installed version by running node --version
from your terminal.
According to the error message it should be at least 14.17.0
.
This is a requirement from the package @typescript-eslint/parser
and is therefore unrelated to our tool.
Hey thanks for the help will @ofhouse do 👍🏾