ahmadawais / create-guten-block

📦 A zero-configuration #0CJS developer toolkit for building WordPress Gutenberg block plugins.
https://Awais.dev/cgb-post
MIT License
3.15k stars 327 forks source link

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

Closed mauricionieto1994 closed 5 years ago

mauricionieto1994 commented 5 years ago

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 commented 5 years ago

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

Any help would be greatly appreciated!

mauricionieto1994 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

rootkowski commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

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](https://github.com/nodejs/node-gyp/issues/1927), which led me to [Installation notes for macOS Catalina (v10.15)](https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md) 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](https://github.com/ahmadawais/create-guten-block/files/4202964/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 commented 3 years ago

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

ivans204 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

Erykko commented 3 years ago

Anyone managed to fix this?

evabelpeq commented 3 years ago

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 commented 3 years ago

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

jllevas commented 3 years ago

This also worked for me as well!

kanakogi commented 3 years ago

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

ghost commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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