ignite new app

Created on 26 Jul 2017  路  8Comments  路  Source: infinitered/ignite


What's going on?

vvv -----[ DEBUG ]----- vvv
{ Error: ENOTEMPTY: directory not empty, rename '/Users/me/tmp/app/app/App' -> '/Users/me/tmp/app/App'
    at Object.fs.renameSync (fs.js:774:18)
    at Object.moveSync [as sync] (/usr/local/lib/node_modules/ignite-cli/node_modules/fs-jetpack/lib/move.js:27:8)
    at Object.move (/usr/local/lib/node_modules/ignite-cli/node_modules/fs-jetpack/lib/jetpack.js:183:12)
    at filename (/usr/local/lib/node_modules/ignite-cli/src/commands/new.js:144:30)
    at forEach (/usr/local/lib/node_modules/ignite-cli/node_modules/ramda/src/forEach.js:43:5)
    at /usr/local/lib/node_modules/ignite-cli/node_modules/ramda/src/internal/_checkForMethod.js:22:10
    at f2 (/usr/local/lib/node_modules/ignite-cli/node_modules/ramda/src/internal/_curry2.js:25:16)
    at Command.command [as run] (/usr/local/lib/node_modules/ignite-cli/src/commands/new.js:143:5)
    at process._tickCallback (internal/process/next_tick.js:103:7)
  errno: -66,
  code: 'ENOTEMPTY',
  syscall: 'rename',
  path: '/Users/me/tmp/app/app/App',
  dest: '/Users/me/tmp/app/App' }
^^^ -----[ DEBUG ]----- ^^^

Steps to reproduce

ignite new app


ignite doctor results:

ignite doctor
System
  platform           darwin
  arch               x64
  cpu                4 cores                  Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
  directory          /Users/sidferreira/tmp

JavaScript
  node               7.6.0        /usr/local/bin/node
  npm                5.3.0        /usr/local/bin/npm
  yarn               0.27.5       /usr/local/bin/yarn

React Native
  react-native-cli   2.0.1

Ignite
  ignite             2.0.0        /usr/local/bin/ignite

Android
  java               1.8.0_101    /usr/bin/java
  android home       -            /Users/me/.AndroidSDK

iOS
  xcode              8.3.3
bug

Most helpful comment

Awesome! We would welcome the contribution! Please reach out if you run into any trouble

All 8 comments

Hi!

I'm pretty sure this is due to naming your app "app", since that causes conflicts with other things named "app" within the project.

We should definitely fix this so it produces a friendlier error, but choosing a different name (Ex: ignite new MyApp) should eliminate the error!

@robinheinze I may do it if you guys want. It's just like the ignite new ignite error

Awesome! We would welcome the contribution! Please reach out if you run into any trouble

@robinheinze I was playing with Ignite and I found the issue.
Ignite cli creates an empty project (./myproject) and inside of it initializes the project (./myproject/myproject). After that, it copies the folders from one to another. Based on the boilerplate files, the same problem may happen if you try to create a Test project.
To really fix this, we should add a token (a _ for example) to the project name when the boilerplate creates the project. Or maybe create a dir in between (./myproject/_/myproject).
I think this will create a discussion a bit larger than I thought.

@sidferreira I like the _ intermediate staging directory idea.

Ideally I'd love to not have this hack at all to be truthful.

The problem I was trying to solve was: the boilerplate library needs to be be added as a dependency of the project it's creating. So it's a chicken/egg situation.

We can't just copy the boilerplate node_modules because we need to have npm/yarn install it.

100% open to better ways of doing this.

@skellock Ok, this may be a bit out of what I read in the source so far, but, what's the issue in merging the dependencies and re-run npm/yarn?

I'm working in a web version of the boilerplate, so I believe soon I'll find it out, but for now I'm asking...

@sidferreira I think it was because it would pick up the npm version rather than whatever global version you had installed.

Hi @sidferreira . This seems a bit dated, so closing. I think you've seen made your own boilerplate too! 馃帀

Was this page helpful?
0 / 5 - 0 ratings