react-webpack-generators / generator-react-webpack

Yeoman generator for ReactJS and Webpack
http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/
MIT License
2.88k stars 355 forks source link

Executing yo react-gen after setup returns: throw er; // Unhandled 'error' event #238

Closed davidpatters0n closed 8 years ago

davidpatters0n commented 8 years ago

I installed both:

npm install -g yo
npm install -g generator-react-webpack

Then ran: yo react-gen after entering the app details I am returned:

events.js:141 throw er; // Unhandled 'error' event ^ AssertionError: Trying to copy from a source that does not exist: /usr/local/lib/node_modules/generator-react-gen/generators/app/templates/.env at EditionInterface.exports._copySingle (/usr/local/lib/node_modules/generator-react-gen/node_modules/mem-fs-editor/lib/actions/copy.js:45:3) at EditionInterface.exports.copy (/usr/local/lib/node_modules/generator-react-gen/node_modules/mem-fs-editor/lib/actions/copy.js:23:17) at EditionInterface.module.exports as copyTpl at tplCopy (/usr/local/lib/node_modules/generator-react-gen/generators/app/index.js:7:11) at /usr/local/lib/node_modules/generator-react-gen/generators/app/index.js:17:5 at Array.forEach (native) at dest (/usr/local/lib/node_modules/generator-react-gen/generators/app/index.js:16:9) at module.exports.yeoman.Base.extend.prompting.writing.features.forEach as writing at Object. (/usr/local/lib/node_modules/generator-react-gen/node_modules/yeoman-generator/lib/base.js:431:23) at /usr/local/lib/node_modules/generator-react-gen/node_modules/run-async/index.js:26:25

It appears the .env file is missing from: /usr/local/lib/node_modules/generator-react-gen/generators/app/templates`. Also have confirmed this is the case because doing:

david.patterson@CATORDPA1-ML /u/l/l/n/g/g/a/templates (master) [1]> ls -lah
total 48
drwxr-xr-x  10 david.patterson  admin   340B 12 Jun 15:37 .
drwxr-xr-x   4 david.patterson  admin   136B 12 Jun 15:37 ..
-rw-r--r--   1 david.patterson  admin   211B 27 May 16:51 .babelrc
-rw-r--r--   1 david.patterson  admin    38B 27 May 18:50 .npmignore
drwxr-xr-x   3 david.patterson  admin   102B 29 May 19:31 features
-rw-r--r--   1 david.patterson  admin   765B 27 May 16:51 karma.conf.js
-rw-r--r--   1 david.patterson  admin   599B  9 Jun 16:13 package.json
drwxr-xr-x   9 david.patterson  admin   306B 12 Jun 15:37 src
-rw-r--r--   1 david.patterson  admin   237B 27 May 16:51 tests.webpack.js
-rw-r--r--   1 david.patterson  admin   3.1K  9 Jun 16:15 webpack.config.js

What would be the reason why I am missing this .env file?

weblogixx commented 8 years ago

Hi @davidpatters0n,

sure you are on the correct project? This does not seem like code generated by generator-react-webpack. Maybe you are using some fork that does not point to its own github repo issues correctly?

davidpatters0n commented 8 years ago

Ahaa, yes thanks. My apologies. I was running: yo react-gen and was supposed to be running: yo react-webpack