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

Generator breaking when adding project sub-directories with node_modules #24

Closed
joaopramos opened this issue Jul 21, 2018 · 2 comments
Closed

Comments

@joaopramos
Copy link
Contributor

joaopramos commented Jul 21, 2018

Steps to reproduce

Hello,
I've been playing around with the generator-feathers-plus and noticed that the generator started breaking after adding the frontend client/ directory.

To reproduce, simply run:

  1. npx create-react-app client
  2. cd client && npm install
  3. cd .. && feathers-plus generate all

From line 45 in code-fragments.js:
${destinationRoot}/**/*.{js,ts}`, { ignore: `${destinationRoot}/node_modules/**` }
We can see that the node_modules directory are not being ignored for subdirectories,
Changing this line to:
${destinationRoot}/**/*.{js,ts}`, { ignore: `${destinationRoot}/**/node_modules/**` }
resolved the issue for me

Expected behavior

The generator should run the prompts

Actual behavior

The generator exits with an error:

Using generator version 0.2.24
{ Error: EISDIR: illegal operation on a directory, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at fs.readFileSync (fs.js:583:19)
    at extractFiles (/Users/joao/.nvm/versions/node/v8.9.0/lib/node_modules/@feathers-plus/cli/node_modules/@feathers-plus/generator-feathers-plus/lib/code-fragments.js:64:25)

System configuration

NodeJS version:
v8.9.0

Operating System:
macOS

@eddyystop
Copy link
Member

Fixed via #25

@eddyystop
Copy link
Member

Published as f+/cli v.0.4.19 running generator v0.2.25.

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

2 participants