Nest-cli: new project have the npm install --silent failed

Created on 10 Jun 2018  ·  9Comments  ·  Source: nestjs/nest-cli

Hi,
I new project have the npm install --silent failed problem at win 10,below is the detail
G:\programm\nestjs-root>nest n nest-test

⚡️ Creating your Nest project...
🙌 We have to collect additional information:

? description : test
? version : 0.0.0
? author : zcw

💥 Thank you for your time!

CREATE /nest-test/.prettierrc (51 bytes)
CREATE /nest-test/nodemon.json (147 bytes)
CREATE /nest-test/package.json (1587 bytes)
CREATE /nest-test/README.md (332 bytes)
CREATE /nest-test/src/app.controller.spec.ts (639 bytes)
CREATE /nest-test/src/app.controller.ts (266 bytes)
CREATE /nest-test/src/app.module.ts (248 bytes)
CREATE /nest-test/src/app.service.ts (138 bytes)
CREATE /nest-test/src/main.hmr.ts (329 bytes)
CREATE /nest-test/src/main.ts (208 bytes)
CREATE /nest-test/test/app.e2e-spec.ts (609 bytes)
CREATE /nest-test/test/jest-e2e.json (154 bytes)
CREATE /nest-test/tsconfig.json (477 bytes)
CREATE /nest-test/tslint.json (895 bytes)
CREATE /nest-test/webpack.config.js (695 bytes)

? Which package manager would you ❤️ to use? npm
▹▸▹▹▹ Take ☕️ or 🍺 during the packages installation process and enjoy your time🙀 Failed to execute command: npm install --silent
× Take ☕️ or 🍺 during the packages installation process and enjoy your time
🙀 Packages installation failed, see above

nest version:5.2.0
node version:v8.9.1
npm version:6.1.0

OS version:Microsoft Windows 10 professional 10.0.17134

bug

Most helpful comment

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
npm install

All 9 comments

I think this related to #138

Ok after investigation I found that is not related to #138
It's a bug on windows only.

The CLI use spawn from child_process and pass '"npm"'argument to the spawn process name. That causes an error on windows.

That was a fix needed to run schematics on windows with spaces on absolute paths...
We're find a way to fix it soon.

Did you happen to find a temporary workaround for this bug? I am trying to create a new project and keep running into this problem along with the issue with the camel case naming convention. I am on a windows machine as well.

Hi, What is the solution for this bug.

I'm having this issue too.

I'm on Macos 10.14.4
Node v10.15.3
Npm v6.9.0
Nest v6.3.0

? Which package manager would you ❤️ to use? npm
▸▹▹▹▹ Installation in progress... ☕Failed to execute command: npm install --silent
✖ Installation in progress... ☕
🙀 Packages installation failed, see above

Do I need to open a new Issue?

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
npm install

I'm having this issue too.

I'm on Macos 10.14.4
Node v10.15.3
Npm v6.9.0
Nest v6.3.0

? Which package manager would you ❤️ to use? npm
▸▹▹▹▹ Installation in progress... ☕Failed to execute command: npm install --silent
✖ Installation in progress... ☕
🙀 Packages installation failed, see above

Do I need to open a new Issue?

installing with yarn seems to work

first open cmd in your project folder you're not gonna have node_modules folder, so use:

npm cache clean --force

and then

npm i

it solved the problem for me.

Thank you #gmcruz123 solved

Was this page helpful?
0 / 5 - 0 ratings