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 328 forks source link

CGB won't install project properly #260

Closed youngmicroserf closed 3 years ago

youngmicroserf commented 4 years ago

Hi,

while trying to create a project with cgb using npx create-guten-block my-block on a current node/npm install on win10 pro 64, the process is constantly aborting after step 2 with the exact same error documented below (and described in this thread: https://github.com/ahmadawais/create-guten-block/issues/34):

I'm bringing this up despite the previous thread because this is happening in a new install after a long time, and because there was no hint at a solution in the previous thread. Maybe some new information has emerged since then. However, the only relevant information I could find was the issue-thread indicated above.

If so, I'd be grateful for some info and help.

  1. node -v: 12.13.1

  2. npm -v: 6.12.1

  3. npm ls cgb-scripts (if you haven’t ejected):-- cgb-scripts@1.22.0

  4. Operating system: WIN 10 PRO 64

This is the error message:

- 3. Creating plugin files...ERROR on templatePromise → Error: EISDIR: illegal operation on a directory, readlink 'O:\xampp\htdocs\my_wp\wp-content\plugins\my-block' at Object.readlinkSync (fs.js:934:3) at checkDest (O:\xampp\htdocs\my_wp\wp-content\plugins\my-block\node_modules\fs-extra\lib\copy-sync\copy-sync.js:183:23) at onDir (O:\xampp\htdocs\my_wp\wp-content\plugins\my-block\node_modules\fs-extra\lib\copy-sync\copy-sync.js:110:24) at getStats (O:\xampp\htdocs\my_wp\wp-content\plugins\my-block\node_modules\fs-extra\lib\copy-sync\copy-sync.js:48:32) at startCopy (O:\xampp\htdocs\my_wp\wp-content\plugins\my-block\node_modules\fs-extra\lib\copy-sync\copy-sync.js:41:10) at Object.copySync (O:\xampp\htdocs\my_wp\wp-content\plugins\my-block\node_modules\fs-extra\lib\copy-sync\copy-sync.js:36:10) at O:\xampp\htdocs\my_wp\wp-content\plugins\my-block\node_modules\cgb-scripts\scripts\init.js:41:7 at new Promise (<anonymous>) at copyTemplateFiles (O:\xampp\htdocs\my_wp\wp-content\plugins\my-block\node_modules\cgb-scripts\scripts\init.js:36:26) at module.exports (O:\xampp\htdocs\my_wp\wp-content\plugins\my-block\node_modules\cgb-scripts\scripts\init.js:168:8) { errno: -4068, syscall: 'readlink', code: 'EISDIR', path: 'O:\\xampp\\htdocs\\my_wp\\wp-content\\plugins\\my-block' }

youngmicroserf commented 3 years ago

I eventually managed to solve this: it's an error that occured when I tried to use create-guten-block from within a directory that is not the home drive. In other words creating the block scaffolding on c:/ works, creating it on o:/ throws errors, for some unknown reason.