$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>javascript - Problem with installation of nestjs sh: 1: nest: not found - Stack Overflow|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - Problem with installation of nestjs sh: 1: nest: not found - Stack Overflow

matteradmin12PV0评论

I am facing the error by

npx @nestjs/cli rest_of_mand_here

I have also tried to install using -g flag, -g --save-dev flag together but nothing seems to be clicking

sh: 1: nest: not found

I have tried the answer nest Command not found but it does not work as I face a new issue which says

bash: /usr/local/Cellar/node/11.9.0/bin/nest: No such file or directory

node version 16.13.2

npm version 8.1.2

I am facing the error by

npx @nestjs/cli rest_of_mand_here

I have also tried to install using -g flag, -g --save-dev flag together but nothing seems to be clicking

sh: 1: nest: not found

I have tried the answer nest Command not found but it does not work as I face a new issue which says

bash: /usr/local/Cellar/node/11.9.0/bin/nest: No such file or directory

node version 16.13.2

npm version 8.1.2

Share Improve this question edited Jan 26, 2022 at 8:15 Ldr asked Jan 26, 2022 at 7:48 LdrLdr 612 silver badges6 bronze badges 6
  • 1 Hey there! have you tried using npx @nestjs/cli rest_of_mand_here? I think this will determine if you have nest globally or locally installed. – MysticSeagull Commented Jan 26, 2022 at 8:00
  • Yup, that is the one giving the error in the first line. I will edit the question for more clarification – Ldr Commented Jan 26, 2022 at 8:14
  • By all means, let me know what you have used already/tried will help me better understand and give help! cause npm install is different from the npx mand. as npx executes a cli tool and npm is the package manager of course – MysticSeagull Commented Jan 26, 2022 at 8:16
  • I have tried npx and npm install only and whenever i install nest and cd into "/usr/local/lib/node_modules" I dont find nest package there. I have also done sudo npm install which is not working – Ldr Commented Jan 26, 2022 at 8:20
  • can you do node -v for me? cause node/11.9.0 feels wrong if you are using v16.13.2 – MysticSeagull Commented Jan 26, 2022 at 8:21
 |  Show 1 more ment

2 Answers 2

Reset to default 5

The problem is that npm/yarn does not install devDependencies if NODE_ENV variable set to production

I solved this problem by removing NODE_ENV from app configuration, and added NODE_ENV=production before running specific build script.

Turns out the alias was not working properly and had to set it like this

alias nest="~/.npm/_npx/ccf722f030a36e55/node_modules/@nestjs/cli/bin/nest.js"
Post a comment

comment list (0)

  1. No comments so far