简体   繁体   中英

yo meanjs not creating app folder

I am a beginner to mean.

I have followed the following steps to create meanjs app :

  1. installed node v0.12.7

  2. npm install -g bower

  3. npm install -g grunt-cli

  4. npm install -g yo
  5. npm install -g generator-meanjs
  6. cd C:\\Users\\SHIVAM\\Desktop\\MyApp
  7. yo meanjs

MyApp folder containing mean directory created

Error occured on yo meanjs 1

Please provide a solution . I am struck at the first phase. I need to get started as sson as possible .

Version 0.4.* has different folder structure. The tutorial you are following is probably using earlier version of meanjs. You can find the new structure here- http://www.bossable.com/954/version-0-4-0/ She has compared the structure with the older one. I was going through the same problem. Follow these tutorials, it will be of great help.

The following directories have been changed in the 0.4.* versions of Meanjs; 0.4.2 is still unstable. 0.4.0 and 0.4.1 is recommended for beginners to get on MEAN.

-New files have been added

1) gulpfile.js -Gulp is relatively faster than grunt because gulp focuses on code rather than cofiguration. It uses node.js' streams, and executes faster, since it does not open/close files, or create intermediary copies all the time. The lack of any up-front configuration, especially, specifying a source and destination is noticed immediately in this file. 2) protractor.conf.js -Support file for end-to-end testing in angularjs applications. (Pretty Neat.)

The app folder is removed, which is the major concern for the noobs trying their hands on MEANjs following the older tutorials. Controllers,views, models are now moved into a separate folder called modules which was previously in the public folder. You can explore modules/core/server and modules/user/server of your project

Addition of client , server and test in modules/core and modules/user folder. All the client side angular will now be in the modules/core/client making it easier to access all services and directives of different modules of the application at one place. And all the backend or server-side files goes to modules/core/server .

public/application.js and public/config.js are now config.js and init.js in modules/core/client/app folder.

config folder is split and new folders assets and lib are added. The previous env folder have been split into env and assets . All the references, mongodb port, session keys goes to the environment(env) whereas new libraries we are defining into our project goes to assets. For instance new css, sass or less reference will be defined into asset/default.js . config.js and init.js are merged into one file config/config.js . lib contains express.js, mongoose.js and socket.io.js.

node_modules is pretty much exactly the same as the previous versions of meanjs. These are the major changes in the folder structure. New models and controllers are added into the modules/users/server according to your application, just so you don't get lost while developing your project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM