Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Error: Command failed: npm install cgb-scripts --save --save-exact --silent #152

Closed
mauricionieto1994 opened this issue Mar 13, 2019 · 27 comments

Comments

@mauricionieto1994
Copy link

Bug Report

Expected Behavior

I wanted to install create-guten-blocks by running the npx create-guten-blocks my-block command.

Actual Behavior

I expected to install the create-guten-block plugin, but when I try to run the "npx create-guten-block my-block" It throws me the next error after a while:

Error: Command failed: npm install cgb-scripts --save --save-exact --silent

at makeError (/home/vagrant/.npm/_npx/4487/lib/node_modules/create-guten-block/node_modules/execa/index.js:169:9)

at Promise.all.then.arr (/home/vagrant/.npm/_npx/4487/lib/node_modules/create-guten-block/node_modules/execa/index.js:274:16)

at processTicksAndRejections (internal/process/next_tick.js:81:5)

I am sorry if im not able to provide further information, this is as far as I got into the plugin, I cant seem to be able to install it at all, let alone use it!!

33a996cb9e20c975beeb06d7ca3e6971

Steps to Reproduce

(Write your steps here:)

  1. Go to the plugins directory on the project.
  2. Open the command line
  3. Run "npx create-guten-block my-block"
  1. node -v: 6.9.0

  2. npm -v: v11.10.1

  3. yarn --version (if you use Yarn): N/A

  4. npm ls cgb-scripts (if you haven’t ejected): N/A

  5. Operating system: Ubuntu 18.04.1 LTS

  6. Browser and version (if relevant): N/A

Possible Solution

It seems to me that the error is when Im installing all the cgb-scripts, but I dont know what is causing the issue.

I would appreciate any help to start working on the plugin as fast as possible, Thank you in advance!

@rootkowski
Copy link

I have exactly the same issue occurring on Windows 10 64-bit.
I'm using:

  • node -v 8.15.0
  • npm -v 6.4.1

Any help would be greatly appreciated!

@mauricionieto1994
Copy link
Author

I have exactly the same issue occurring on Windows 10 64-bit.
I'm using:

  • node -v 8.15.0
  • npm -v 6.4.1

Any help would be greatly appreciated!

I was very dissapointed to not have any sort of support from this plugin after almost ten days of posting my issue, and I found out a way to create my own blocks from scratch in this very in-depth and well explained video, it helped me to create my own block and also showed me a little JSX / React (which is what gutenberg blocks uses), I hope you find it useful:

https://www.youtube.com/watch?v=Mv68Sa-iHyo&list=LL22-OvuLQevpuSFPWrwXcTA&t=1686s&index=15

@ahmadawais
Copy link
Owner

I'm happy for you.

Don't expect support for free and Open source software that 99% people who use it never contribute to or support monetarily.

I wish I had ten more like me to help with everything.

@ahmadawais
Copy link
Owner

Also I don't have Windows so I'm helpless in helping you.

@rootkowski
Copy link

Thanks @mauricionieto1994 I'll definitely take a look at the video!

@ahmadawais I understand your point! I was wondering, is there any way we could help to make it work on Windows and Ubuntu?

@ahmadawais
Copy link
Owner

It is open source. Try to test and figure out what's wrong and then contribute the fix. That's how you can help with code. Otherwise, support me or someone else by monetary donation to devote some time to this project and fix this for you. Both forms of contributions are welcomed.

@bernot-dev
Copy link

This is an error related to the vagrant guest not allowing the creation of symbolic links (which is attempted by a dependency of create-guten-block) on a synced folder.

After a long trip down the rabbit hole, I had success by setting SharedFoldersEnableSymlinksCreate: true in the Vagrantfile for my box and running vagrant up as an administrator.

@MastaBaba
Copy link

I'm having the exact same problem. On macOS Catalina.

@AVB100 : I'm not familiar with Vagrant. Is this something related to a Windows box?

Here's my output:

✔ 1. Creating the plugin directory called →  custom-image-block 
⠋ 2. Installing npm packages.../Users/bf/.npm/_npx/23001/lib/node_modules/create-guten-block/index.js:60
	throw err;
	^

Error: Command failed: npm install cgb-scripts --save --save-exact --silent


    at makeError (/Users/bf/.npm/_npx/23001/lib/node_modules/create-guten-block/node_modules/execa/index.js:169:9)
    at /Users/bf/.npm/_npx/23001/lib/node_modules/create-guten-block/node_modules/execa/index.js:274:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /Users/bf/.npm/_npx/23001/lib/node_modules/create-guten-block/app/npmInstallScripts.js:48:3 {
  code: 1,
  stdout: '',
  stderr: '',
  failed: true,
  signal: null,
  cmd: 'npm install cgb-scripts --save --save-exact --silent',
  timedOut: false,
  killed: false
}

My node is at 12.13.1
My nom is at 6.12.1

@megclaypool
Copy link

I'm also having this problem.

Mac OS 10.15.3
node 10.16.3
npm 6.5.0

Here's my output:

✔ 1. Creating the plugin directory called →  radicati-accordion
⠏ 2. Installing npm packages.../Users/noxlady/.npm/_npx/32679/lib/node_modules/create-guten-block/index.js:60
	throw err;
	^

Error: Command failed: npm install cgb-scripts --save --save-exact --silent


    at makeError (/Users/noxlady/.npm/_npx/32679/lib/node_modules/create-guten-block/node_modules/execa/index.js:169:9)
    at Promise.all.then.arr (/Users/noxlady/.npm/_npx/32679/lib/node_modules/create-guten-block/node_modules/execa/index.js:274:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)

@megclaypool
Copy link

Wow, I've fallen down a series of rabbit holes trying to figure this out...

  • It looks like the problem involves installing cgb-scripts, so I tried to install it outside of create-guten-block. The command npm install cgb-scripts fails with error codes that look like:
$ npm install cgb-scripts
npm WARN deprecated eslint-config-wordpress@2.0.0: This package has been deprecated, please use @wordpress/eslint-plugin or @wordpress/scripts
npm WARN deprecated eslint-plugin-wordpress@0.1.0: This package has been deprecated, please use @wordpress/eslint-plugin or @wordpress/scripts
npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! code EINTEGRITY
npm ERR! sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= integrity checksum failed when using sha1: wanted sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= but got sha512-gTBHf/fKC0j390N1nuWbhSEdD/9LhOvNWIBya741p6nfghKZNKLqpXuYQMZSLEz9w76IFaScG87s6Py/lwd4Hg== sha1-skgI4K473oZs1le1FkEy83v2Zag=. (277859 bytes)
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

Google led me to Is this an Issue with MACOS catalina? · Issue #1927 · nodejs/node-gyp · GitHub, which led me to Installation notes for macOS Catalina (v10.15) and I followed their troubleshooting. Confirmed that I failed both parts of "the acid test", and ended up manually installing XCode Command Line Tools via the Apple developer website. (I tried xcode-select --install and got an error telling me it was already installed and I needed to update via "Software Update" :P)

That fixed my receipts, so then I was able to nvm install 12, which took forever...

So with bated breath, I tried npm install cgb-scripts again... AAAARRGHH -- I'm still getting the same error!

Here's the error log:
2020-02-14T05_37_23_052Z-debug.log

My node is now version 12.16.0 and npm is version 6.13.4

@ahmadawais, is there anything else I can do to try to help you troubleshoot this?

@evgrezanov
Copy link

Error: Command failed: npm install cgb-scripts --save --save-exact --silent
have same problem anyone can fix?

@ivans204
Copy link

For anyone looking...

  1. At first delete package-lock.json file and node_modules/ folder.
  2. Open Windows PowerShell as Administrator.
  3. Run npm install --global windows-build-tools
  4. Run the command npm i -g node-sass@4.12.0.
  5. After that, go to the project folder and run npm install

@mathieu-ludwig
Copy link

Hello,

I had the same error : Error: Command failed: npm install cgb-scripts --save --save-exact --silent

I succeed by install cgb-scripts globally : npm install -g cgb-scripts
(I am on Windows 10 with Linux subsystem Debian)

@davidLpt
Copy link

2021, same exact error on mac os Big sur........ Is this project completely dead, did anybody manage to fix this problem?

@Erykko
Copy link

Erykko commented Jul 13, 2021

Anyone managed to fix this?

@evabelpeq
Copy link

On macOS Catalina, using nvm with v14.17.0 node version, it worked for me.
My problem was with the node version of the system v16.2.0 and the incompatibility with node-sass. I hope this helps someone

@leonhoffmann86
Copy link

@evabelpeq You made my day! Works for me too! Thanks for sharing!

@jllevas
Copy link

jllevas commented Aug 24, 2021

This also worked for me as well!

@kanakogi
Copy link

kanakogi commented Sep 9, 2021

@evabelpeq I change the node v14.17.0 node version, it worked for me. Thanks for sharing!

@ghost
Copy link

ghost commented Feb 8, 2022

Sadly the error still persists for me while using node v14.17.0 (npm v6.14.13) via nvm. (Big Sir: 11.6.2 (20G314)) M1 Chip.

@blachawk
Copy link

blachawk commented Feb 24, 2022

Thank you @evabelpeq . I'm on Windows 10. So I installed NVM for Windows. Through nvm, I installed and use node.js 14.17.0 and now my package errors are gone.

Many thanks!

@gerardsec
Copy link

Sadly the error still persists for me while using node v14.17.0 (npm v6.14.13) via nvm. (Big Sir: 11.6.2 (20G314)) M1 Chip.

work for me:
MacOs Monterey
Node v14.17.0
Apple M1
#i use n
npm install -g n
n 14.17.0

@syncrayons
Copy link

On macOS Catalina, using nvm with v14.17.0 node version, it worked for me. My problem was with the node version of the system v16.2.0 and the incompatibility with node-sass. I hope this helps someone

-------------worked--------------
windows 11
node version v14.17.0

thanks

@merianos
Copy link

I had that same issue on my Ubuntu environment while I had activated the Node version 16.14.2.

When I changed the Node version down to 14.12.0 and I run the command npx create-guten-block my-block it worked without problem.

Hope that helps some of you :)

@kalebheitzman
Copy link

When I changed the Node version down to 14.12.0 and I run the command npx create-guten-block my-block it worked without problem.

Thanks!

@kimaldis
Copy link

Macos, node 17, didn't work. downgraded node to 14, just got a different error.

I'm done. I get free software and whatever but the number of posts on this suggests it's quite an issue and worthy of more developer attention. At the risk of getting shouted at, this should be better and i'm done.

@cafesk8
Copy link

cafesk8 commented Jun 21, 2022

Downgrading from node 17.9.0 to node 14.19.3 with nvm helped me (Win10 - WSL Debian)nvm -

Repository owner deleted a comment from t-lock Sep 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests