question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting Command "link-caa" not found when setting up local dev environment

See original GitHub issue

Describe the bug Getting this error when running npm run setup-dev-win

error Command "link-caa" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! amplify-cli@0.1.0 setup-dev-win: `yarn dev-build && yarn link-win && yarn link-caa`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the amplify-cli@0.1.0 setup-dev-win script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Amplify CLI Version amplify-cli master branch

To Reproduce yarn config set workspaces-experimental true npm run setup-dev-win

Expected behavior Should finish without errors

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Node Version. v12.16.3

Additional context Modifying package.json and updating setup-dev-win with line below fixes the issue

"setup-dev-win": "lerna exec -- del /f package-lock.json && lerna bootstrap && cd packages/amplify-cli && del /f package-lock.json && npm link && cd ../.. && lerna run build",

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
aedrianesculturacommented, Oct 7, 2020

@nikhname link-bin seems designed to create amplify-dev.cmd only so link-aa-win will overwrite link-win.
We can make link-bin.js accept another parameter for the command name like the following:

In package.json

    "link-win": "node ./scripts/link-bin.js packages/amplify-cli/bin/amplify amplify-dev",
    "link-aa-win": "node ./scripts/link-bin.js packages/amplify-app/bin/amplify-app amplify-app-dev",
    "setup-dev-win": "yarn dev-build && yarn link-win && yarn link-aa-win",

In link-bin.js

if (process.argv.length < 4) {
  console.log('requires 2 arguments. source');
  process.exit(1);
}

const src = path.join(process.cwd(), process.argv[2]);
let dest;
if (process.argv.length === 4) {
  const yarnGlobalBin = childProcess
    .execSync('yarn global bin')
    .toString()
    .trim();
  dest = path.join(yarnGlobalBin, process.argv[3]);
} else {
  dest = path.isAbsolute(process.argv[4]) ? process.argv[4] : path.join(process.cwd(), process.argv[3]).toString();
  dest = path.join(yarnGlobalBin, process.argv[4]);
}
0reactions
github-actions[bot]commented, May 25, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set up a local development environment - Drupal
Most of the steps needed are command-line commands. Press Ctrl-Alt-T to open the terminal to use them. The advantage is that you can...
Read more >
Getting started with local development - HubSpot Developers
1. Create a working directory ... Create a folder for your local project. For example, run mkdir local-cms-dev in the command line, which...
Read more >
Set up a local development environment | Dynamics 365
After Visual Studio tools are installed, open a Command Prompt window, and run the command where msbuild . If msbuild.exe isn't found, run...
Read more >
Setting up a Node development environment - MDN Web Docs
Know how to open a terminal / command line. Know how to install software packages on your development computer's operating system. Objective: To ......
Read more >
Setting up your development environment
In this tutorial, you'll set up a local development environment for your computer. You can use the environment to: Build and test Zendesk...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found