chrisdwheatley / generator-angular2 Goto Github PK
View Code? Open in Web Editor NEWA Yeoman Generator to create Angular2 apps right now.
Home Page: https://npmjs.com/package/generator-angular2
License: MIT License
A Yeoman Generator to create Angular2 apps right now.
Home Page: https://npmjs.com/package/generator-angular2
License: MIT License
When gulp serve
runs it opens http://0.0.0.0:8000 which doesn't work.
Shouldn't this project keep up with angular2 releases?
Thanks
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.
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.
Initially implemented in Gulp.
main angular 2 and all are not loading . in browser only showing loading
not worked
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);
'''
Can you add some documentation describing the generated structure and file descriptions.
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
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.
This commands:
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 } *
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.
I can't seem to make it pass the loading phase. All I get is 404 on the es6-shim.js
Ensures the barrier to entry is as low as possible for people to contribute.
The readme says
A Yeoman Generator to aid in bootstrapping an Angular2 application using the very latest
Angular2 alpha release.
But #41 (comment) says that this is using beta version of angular.
Just to avoid the confusion, could you update the readme saying that now this generator uses angular beta
The current generate .gitignore
file doesn't ignore the build directory.
Update the template to ignore /build/
and remove ignoring /src/lib/
.
There are some test elements that are deprecated and need to be updated.
i hope it will similar to yeoman official generator [generator-angular];
let us build a angular2 app easy.
provide a complete develop environment to build a app.
in short,many people will happy to see this;
rise up and like!
Expand upon single option to allow users to choose their build/development tool.
Allow choices:
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)
Required:
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.
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.
Current list of options to implement:
Current list of options to implement:
.js
.es6
.ts
Ensure all dependencies required to build the codebase are installed. Including node modules and any files/modules which need to be manually loaded in.
Hi.
How to use the implements?
For example, I need to use - implements OnChanges - https://angular.io/docs/js/latest/api/core/index/OnChanges-class.html
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.
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 on windows 8.1, node 5.0.0, npm 3.4.0
C:\Users...\AppData\Roaming\npm
└── (empty)
npm ERR! code 1
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
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.