Git Product home page Git Product logo

generator-angular2's People

Contributors

chrisdwheatley avatar gitter-badger avatar johndeprecated avatar mrzepinski avatar vuxor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-angular2's Issues

Update to latest alpha

Currently we're tracking an alpha behind the latest one. There are some breaking changes in the latest alpha which need to be addressed before the generator can be updated.

angular rc5

i'd like to know if there are plans to support angular rc5, from this version angular2 come stable, i think since ngmodule is implemented.

gulp build:prod error

run 'gulp build:prod' error generated on 'bundle:app' task.

The issue occured on finding 'node_modules' folder.

Solution:

'''
(function(global) {
var paths = {
'npm:': './node_modules/'
};

var map = {
    'app': 'app',
    '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
    '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
    '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
    '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
    '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
    '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
    '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
    '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
    'rxjs': 'npm:rxjs'
};

// packages tells the System loader how to load when no filename and/or no extension
var packages = {
    app: { main: 'main.js',  defaultExtension: 'js' },
    rxjs: { defaultExtension: 'js' }
};

var config = {
    paths: paths,
    map: map,
    packages: packages
};

System.config(config);

})(this);

'''

Error when running the command yo angular2

I've followed as per your tutorials and find the following error when running yo angular2.

Error angular2 

You don't seem to have a generator with the name angular2 installed.
You can see available generators with npm search yeoman-generator 
and then install them with npm install [name].

The yo and angular-generator has been installed using the following command:
npm install -g yo generator-angular2

Potentially unhandled rejection [2] TypeError: Error loading "index" at http://localhost:8000/index.js

I created the project and then immediately loaded it (on windows) using:
node_modules.bin\gulp dev

Browser window opens (chrome) and I get the following exception in the console:
Potentially unhandled rejection [2] TypeError: Error loading "index" at http://localhost:8000/index.js
Cannot convert object to primitive value
at http://localhost:8000/lib/system.js:1:4824
at Array. (http://localhost:8000/lib/angular2.js:3888:7)
at d (http://localhost:8000/lib/system.js:1:5501)
at d (http://localhost:8000/lib/system.js:1:5364)
at d (http://localhost:8000/lib/system.js:1:5364)
at l (http://localhost:8000/lib/system.js:1:4590)
at Object.execute (http://localhost:8000/lib/system.js:1:8278)
at o (http://localhost:8000/lib/es6-module-loader.js:7:18496)
at p (http://localhost:8000/lib/es6-module-loader.js:7:18868)
at j (http://localhost:8000/lib/es6-module-loader.js:7:16406)

Being totally new to ES6/Angular2/Traceure and System, I'm not sure where to begin with debugging this.

Name of the folder holding the project can't be a number

This commands:

  • mkdir 2angulp
  • cd 2angulp
  • yo angular2

Got the following error:

13:20:50] Using gulpfile /Library/WebServer/Documents/2angulp/gulpfile.js
[13:20:50] Starting 'dependencies'...
[13:20:50] Starting 'js'...
[13:20:50] Starting 'html'...
[13:20:50] Starting 'css'...
[13:20:50] Finished 'css' after 14 ms

*events.js:154
throw er; // Unhandled 'error' event
^
MultipleErrors: 2-angulp:11:14: Unexpected token 2
2-angulp:11:15: Unexpected token Angulp
2-angulp:11:22: Unexpected token {
2-angulp:13:17: Semi-colon expected
2-angulp:17:1: Unexpected token } *

$traceurRuntime not found

node version 5.0.0
npm version 3.3.6

Probably due to npm 3's node modules structure flattening it's no longer possible to dig deep into a dependency of a dependency consistently.

The copy being done here will work on npm < version 3.

Solution is probably to include traceur as a separate dependency and reference it directly.

Ignore build directory

The current generate .gitignore file doesn't ignore the build directory.

Update the template to ignore /build/ and remove ignoring /src/lib/.

Generator presumes users have gulp installed globally

If they don't then the generator will fail and it'll be unclear as to why. Options are to use the locally installed version or add documentation that gulp being installed globally is a dependency. Investigate how other generators/projects handle it.

screen shot 2015-03-17 at 22 46 49

Error running yo angular2

iojs v: 2.2.1
npm v: 2.11.0

$ yo angular2
module.js:334
throw err;
^
Error: Cannot find module 'lru-cache'
at Function.Module._resolveFilename (module.js:332:15)
at Function.Module._load (module.js:282:25)
at Module.require (module.js:361:17)
at require (module.js:380:17)
at C:\Users\trist\AppData\Roaming\npm\node_modules\generator-angular2\node_modules\yeoman-generator\node_modules\download\node_modules\vinyl-fs\node_modules
\glob-watcher\node_modules\gaze\node_modules\globule\node_modules\minimatch\minimatch.js:35:11
at Object. (C:\Users\trist\AppData\Roaming\npm\node_modules\generator-angular2\node_modules\yeoman-generator\node_modules\download\node_modules\v
inyl-fs\node_modules\glob-watcher\node_modules\gaze\node_modules\globule\node_modules\minimatch\minimatch.js:1051:3)
at Module._compile (module.js:426:26)
at Object.Module._extensions..js (module.js:444:10)
at Module.load (module.js:351:32)
at Function.Module._load (module.js:306:12)

Problems with running application.

After generating app and running the server i saw this error.

GET http://localhost:8081/rx.js 404 (Not Found) (zone.js:535)

So i have added line in index.html

      System.config({
        paths: {
          'angular2/*': 'lib/angular2.js',
          'rx/dist/rx.all': 'lib/rx.all.js',
          'rx':  'lib/rx.all.js', // <--- 
          'index': 'index.js'
        }
      });

And now i have got different problem...

Error during instantiation of Token(AppComponentAnnotatedType)!. ORIGINAL ERROR: reflect-metadata shim is required when using class decorators

Error
    at InstantiationError.BaseException (angular2.js:8797)
    at InstantiationError.AbstractBindingError (angular2.js:20707)
    at new InstantiationError (angular2.js:20754)
    at _AsyncInjectorStrategy.execute._AsyncInjectorStrategy._findOrCreate (angular2.js:21094)
    at angular2.js:21074
    at Zone.run (zone.js:93)
    at zoneBoundFn (zone.js:70)
    at O (es6-module-loader.src.js:1177)
    at K (es6-module-loader.src.js:1136)
    at y.7.y.when (es6-module-loader.src.js:927)execute.BrowserDomAdapter.logError @ angular2.js:7299defaultErrorReporter @ angular2.js:6539execute.VmTurnZone._onError @ angular2.js:20289execute.VmTurnZone._createInnerZone.errorHandling.onError @ angular2.js:20258run @ zone.js:96zoneBoundFn @ zone.js:70O @ es6-module-loader.src.js:1177K @ es6-module-loader.src.js:11367.y.when @ es6-module-loader.src.js:9277.v.run @ es6-module-loader.src.js:8183.a._drain @ es6-module-loader.src.js:973.a.drain @ es6-module-loader.src.js:62b @ es6-module-loader.src.js:267
es6-module-loader.src.js:139 Potentially unhandled rejection [6] Error
    at InstantiationError.BaseException (http://localhost:8081/lib/angular2.js:8797:25)
    at InstantiationError.AbstractBindingError (http://localhost:8081/lib/angular2.js:20707:66)
    at new InstantiationError (http://localhost:8081/lib/angular2.js:20754:64)
    at _AsyncInjectorStrategy.execute._AsyncInjectorStrategy._findOrCreate (http://localhost:8081/lib/angular2.js:21094:21)
    at http://localhost:8081/lib/angular2.js:21074:27
    at Zone.run (http://localhost:8081/lib/zone.js:93:19)
    at zoneBoundFn (http://localhost:8081/lib/zone.js:70:19)
    at O (http://localhost:8081/lib/es6-module-loader.js:7:7462)
    at K (http://localhost:8081/lib/es6-module-loader.js:7:7094)
    at y.7.y.when (http://localhost:8081/lib/es6-module-loader.js:7:10248)

Chrome 42.

Get error when trying to run after install

Following the directions, I've installed generator-angular2 globally, created a directory and try running yo angular2, but I get the following error:

Error: Cannot find module 'npm-check'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/generator-angular2/app/index.js:5:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

I'm assuming there is some global dependency I need that isn't installed. I'm running on a Mac Book Pro using Node installed using brew.

Include all the required dependencies

Ensure all dependencies required to build the codebase are installed. Including node modules and any files/modules which need to be manually loaded in.

unable to run application

I have generated the application but when I run npm start, I am getting the following error.

sudo npm start

[email protected] start /Users/nmadasu/Projects/dashboard1
gulp dev

[12:58:59] Using gulpfile ~/Projects/dashboard1/gulpfile.js
[12:58:59] Starting 'watch'...
[12:58:59] Finished 'watch' after 26 ms
[12:58:59] Starting 'serve'...
[12:58:59] Webserver started at http://localhost:8000
[12:58:59] Finished 'serve' after 52 ms
[12:58:59] Starting 'dev'...
[12:58:59] Finished 'dev' after 202 μs
events.js:160
throw er; // Unhandled 'error' event
^

Error: getaddrinfo ENOTFOUND localhost
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)

npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.2.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: gulp dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'gulp dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the dashboard-1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs dashboard-1
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls dashboard-1
npm ERR! There is likely additional logging output above.

Running npm start does not generate the build

Hello, I ran into a weird issue while trying the generator. When i run gulp through npm, it doesn't generate the build folder. However if I run gulp directly, everything works as expected. I was wondering if it was an issue with my config or if it was like this for everyone.

Here's how to reproduce the issue :

mkdir something; cd something;
yo angular2
rm -r build
npm start

It launches the browser and the browser say "Cannot GET / "

generator not installable

generator not installable on windows 8.1, node 5.0.0, npm 3.4.0

C:\Users...\AppData\Roaming\npm
└── (empty)

npm ERR! code 1

Switch from using angular quickstart to relevant node modules

Dependencies are currently pulled in from the angular/quickstart repository, this repository is likely a temporary solution while angular2 is in alpha. Move towards including the required dependencies in package.json.

  • angular
  • rtts/typescript?
  • systemjs
  • es6-shim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.