GithubHelp home page GithubHelp logo

angular-meteor-base's Introduction

Angular-Meteor Boilerplate

Usage

Since Meteor v1.4 you can use one command to create a working Angular2 app based on this boilerplate:

meteor create --example angular-boilerplate

This will tell you to clone this repo though, so sinc you're here you might as well do git clone immediately:

git clone https://github.com/Urigo/angular-meteor-base.git

NPM Scripts

This boilerplate comes with predefined NPM scripts, defined in package.json:

  • $ npm run start - Run the Meteor application.
  • $ npm run start:prod - Run the Meteor application in production mode.
  • $ npm run build - Creates a Meteor build version under ./build/ directory.
  • $ npm run clear - Resets Meteor's cache and clears the MongoDB collections.
  • $ npm run meteor:update - Updates Meteor's version and it's dependencies.
  • $ npm run test - Executes Meteor in test mode with Mocha.
  • $ npm run test:ci - Executes Meteor in test mode with Mocha for CI (run once).

Boilerplate Contents

This boilerplate contains the basics that requires to quick start with Angular2-Meteor application.

This package contains:

  • TypeScript support (with @types) and Angular 2 compilers for Meteor
  • Angular-Meteor
  • Angular (core, common, compiler, platform, router, forms)
  • SASS, LESS, CSS support (Also support styles encapsulation for Angular 2)
  • Testing framework with Mocha and Chai
  • Meteor-RxJS support and usage

Folder Structure

The folder structure is a mix between Angular 2 recommendation and Meteor 1.3 recommendation.

Client

The client folder contains single TypeScript (.ts) file which is the main file (/client/app.component.ts), and bootstrap's the Angular application.

The main component uses HTML template and SASS file.

The index.html file is the main HTML which loads the application by using the main component selector (<app>).

All the other client files are under client/imports and organized by the context of the components (in our example, the context is demo).

Server

The server folder contain single TypeScript (.ts) file which is the main file (/server/main.ts), and creates the main server instance, and the starts it.

All other server files should be located under /server/imports.

Common

Example for common files in our app, is the MongoDB collection we create - it located under /both/demo-collection.ts and it can be imported from both client and server code.

Testing

The testing environment in this boilerplate based on Meteor recommendation, and uses Mocha as testing framework along with Chai for assertion.

angular-meteor-base's People

Contributors

ardatan avatar bsliran avatar darkbasic avatar dotansimha avatar georgyberdyshev avatar hongbo-miao avatar ijager avatar kamilkisiela avatar miaoulo avatar renovate-bot avatar renovate[bot] avatar tallyb avatar urigo 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

angular-meteor-base's Issues

Suitable tslint config

This boilerplate doesn't have tslint config, it would be good if people can get a correct tslint configuration.

Test config

The documentation says it has test configuration, but it is not, need to be solved.

Which module loader ... webpack, systemjs?

Hi,

I don't see any module loader like webpack or systemjs in the folders. Are you using another one, or am I missing something. I need a module loader for my project, How can I integrate webpack for example into this base-project?

Thank you

Error while checking for [email protected]:

Hey!
I cloned this rep, and "meteor npm install" showed me error with 'typings i' installation.
"npm install -g typings" solves this problem

But "meteor" - command display this error.

Started MongoDB.
Errors prevented startup:

While checking for [email protected]:
error: No compatible binary build found for this package. Contact the package author and ask them to publish it for your platform.

Your application has errors. Waiting for file change.

Client-side tests are not running

Having run the tests using meteor npm test the server-side tests run OK but the client-side tests fail to run reporting "TypeError: Reflect.getMetadata is not a function".

I added barbatus:angular2-polyfills to the project, which resolves this issue but then I get

TypeError: Cannot read property 'assertPresent' of undefined
    at resetFakeAsyncZone (packages/modules.js?hash=608d88c3b9bdec5c9c366c73adfa7702609a9944:10963:22)
    at Context.<anonymous> (packages/modules.js?hash=608d88c3b9bdec5c9c366c73adfa7702609a9944:11615:13)
    at callFn (packages/practicalmeteor_mocha-core.js?hash=12c98471b374d75331cd9dcc7e691e23967c4550:4345:21)
    at Hook.Runnable.run (packages/practicalmeteor_mocha-core.js?hash=12c98471b374d75331cd9dcc7e691e23967c4550:4338:7)
    at next (packages/practicalmeteor_mocha-core.js?hash=12c98471b374d75331cd9dcc7e691e23967c4550:4684:10)
    at packages/practicalmeteor_mocha-core.js?hash=12c98471b374d75331cd9dcc7e691e23967c4550:4706:5
    at timeslice (packages/practicalmeteor_mocha-core.js?hash=12c98471b374d75331cd9dcc7e691e23967c4550:12674:27)

in demo-data.service.test.ts

scss main file should be in /client

Hi, just started a project 2 weeks ago with this base code (wasn't working with meteor for 6+ months) and just updated to the current TS2 version. I want to mention that the scss file

angular2-meteor-base/client/imports/app/app.component.scss

should be in angular2-meteor-base/client/ as it was before or imported there in a main.scss file.

TODO: Add testing example's

Add testing examples for both client and server side

  • Tests framework + TypeScript
  • Mocha + Chai
  • Tests main file (initiliazer.test.ts)
  • Create Polyfills for angular2 framework base
  • DemoComponent tests (with Angular utils)
  • DemoDataService tests (with Meteor utils)
  • Server-side tests

meteor 1.6 not working

Hi
I'm using your template with angular 4 and meteor 1.6 but it doesn't work for me.
When I run meteor command, project is compile well and is ready to browse http://localhost:3000,
but when I browse it my page is crash and I don't see any thing, I try to solve my problem and I found that when main.html is process and reaches to tag The Application is crash.
please help me.

Running on mobile (android) get "EXCEPTION: The selector "app" did not match any elements"

Didn't change anything from initial setup. Just did
git clone https://github.com/bsliran/angular2-meteor-base ang-2-test
then
npm i
then
meteor add-platform android
and after that
meteor run android

And get output:

[[[[[ ~/ang-2-test ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Started your app.

=> App running at: http://localhost:3000/
=> Started app on Android Emulator.
I20160927-17:56:18.687(3)? 09-27 17:56:15.613 11815 11815 I chromium: [INFO:library_loader_hooks.cc(120)] Chromium logging enabled: level = 0, default verbosity = 0
I20160927-17:56:18.893(3)? 09-27 17:56:15.618 11815 11815 W chromium: [WARNING:resource_bundle.cc(285)] locale_file_path.empty()
I20160927-17:56:18.893(3)? 09-27 17:56:15.779 11815 11840 W chromium: [WARNING:data_reduction_proxy_config.cc(423)] SPDY proxy OFF at startup
I20160927-17:56:18.894(3)? 09-27 17:56:16.252 11815 11815 I MeteorWebApp: Serving asset bundle with version: 94dbac9ac7f82b0f10b6111dbf61355da9929c6a
I20160927-17:56:19.453(3)? 09-27 17:56:19.207 11815 11815 I chromium: [INFO:CONSOLE(44719)] "EXCEPTION: The selector "app" did not match any elements", source: http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c (44719)
I20160927-17:56:19.453(3)? 09-27 17:56:19.207 11815 11815 I chromium: [INFO:CONSOLE(44724)] "ORIGINAL STACKTRACE:", source: http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c (44724)
I20160927-17:56:19.454(3)? 09-27 17:56:19.207 11815 11815 I chromium: [INFO:CONSOLE(44725)] "Error: The selector "app" did not match any elements
I20160927-17:56:19.454(3)? 09-27 17:56:19.207 11815 11815 I chromium: at DomRenderer.selectRootElement (http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c:52929:27)
I20160927-17:56:19.454(3)? 09-27 17:56:19.207 11815 11815 I chromium: at AppView.selectOrCreateHostElement (http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c:50698:45)
I20160927-17:56:19.454(3)? 09-27 17:56:19.207 11815 11815 I chromium: at AppView.View_AppComponent_Host0.createInternal (AppComponent_Host.ngfactory.js:12:21)
I20160927-17:56:19.454(3)? 09-27 17:56:19.207 11815 11815 I chromium: at AppView.create (http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c:50676:25)
I20160927-17:56:19.454(3)? 09-27 17:56:19.207 11815 11815 I chromium: at ComponentFactory.create (http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c:47286:40)
I20160927-17:56:19.454(3)? 09-27 17:56:19.207 11815 11815 I chromium: at ApplicationRef
.bootstrap (http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c:48308:44)
I20160927-17:56:19.454(3)? 09-27 17:56:19.207 11815 11815 I chromium: at http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c:48217:93
I20160927-17:56:19.455(3)? 09-27 17:56:19.207 11815 11815 I chromium: at Array.forEach (native)
I20160927-17:56:19.455(3)? 09-27 17:56:19.207 11815 11815 I chromium: at PlatformRef_._moduleDoBootstrap (http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c:48217:46)
I20160927-17:56:19.455(3)? 09-27 17:56:19.207 11815 11815 I chromium: at http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c:48185:31", source: http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c (44725)
I20160927-17:56:19.457(3)? 09-27 17:56:19.211 11815 11815 I chromium: [INFO:CONSOLE(22161)] "Unhandled Promise rejection:", source: http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c (22161)
I20160927-17:56:19.457(3)? 09-27 17:56:19.211 11815 11815 I chromium: [INFO:CONSOLE(22163)] "Error: Uncaught (in promise): Error: The selector "app" did not match any elements", source: http://localhost:12664/packages/modules.js?hash=4be311643e1c41661f1a49112889b8bafe1ed68c (22163)

I always get this and not that I can do. I work on Windows 10 64bit

E:\Projects\LearnMeteor\socially>meteor
[[[[[ ~\E\Projects\LearnMeteor\socially ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:

While checking for [email protected]:
error: No compatible binary build found for this package. Contact the package author and ask them to publish it
for your platform.

=> Your application has errors. Waiting for file change.

error while importing chai-spies

I got the following error: [ts] Module ''chai-spies'' resolves to a non-module entity and cannot be imported using this construct.

chai.spy() - [ts] Property 'spy' does not exist on type 'ChaiStatic'.

Please help. Thanks.

Step 0 - Bootstrapping ,meteor is err

Step 0 - Bootstrapping

$ meteor npm install ok:
$ meteor
=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:

While loading package barbatus:[email protected]_1:
error: Command failed: /home/sen/.meteor/packages/meteor-tool/.1.4.1_1.lcsnvf++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm rebuild --no-bin-links --update-binary
{ [Error: EACCES: permission denied, mkdir
'/home/sen/.meteor/packages/barbatus_scss-compiler/.3.8.1_1.mubs29++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1xuiklv/node_modules/node-sass/vendor/linux-x64-46']
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/home/sen/.meteor/packages/barbatus_scss-compiler/.3.8.1_1.mubs29++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1xuiklv/node_modules/node-sass/vendor/linux-x64-46' }
gyp info it worked if it ends with ok
gyp verb cli [ '/home/sen/.meteor/packages/meteor-tool/.1.4.1_1.lcsnvf++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node',
gyp verb cli '/home/sen/.meteor/packages/barbatus_scss-compiler/.3.8.1_1.mubs29++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/bin/python2
gyp verb check python version /usr/bin/python2 -c "import platform; print(platform.python_version());" returned: "2.7.12\n"
gyp verb get node dir no --target version specified, falling back to host node version: 4.5.0
gyp verb command install [ '4.5.0' ]
gyp verb install input version string "4.5.0"
gyp verb install installing version: 4.5.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 4.5.0
gyp verb build dir attempting to create "build" dir:
/home/sen/.meteor/packages/barbatus_scss-compiler/.3.8.1_1.mubs29++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1xuiklv/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir
'/home/sen/.meteor/packages/barbatus_scss-compiler/.3.8.1_1.mubs29++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1xuiklv/node_modules/node-sass/build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 4.4.0-36-generic
gyp ERR! command "/home/sen/.meteor/packages/meteor-tool/.1.4.1_1.lcsnvf++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/sen/.meteor/packages/barbatus_scss-compiler/.3.8.1_1.mubs29++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext="
"--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/sen/.meteor/packages/barbatus_scss-compiler/.3.8.1_1.mubs29++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/.temp-1xuiklv/node_modules/node-sass
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Build failed

Template not found

I've got the base setup as Visual Studio project under Windows 10. No errors generated when running meteor, but going to http://localhost:3000/ just shows "Loading...". After looking at the code in VS, I found that in app.component.ts, the following line:
import template from './app.component.html';
appears with a red-squiggle under the string and hovering over it shows: "Cannot find module", which I don't understand because I can clearly see that the file is there.

2 errors on typings.d.ts with Atom and atom-typescript

ide: ATOM 1.12.7
Package: atom-typescript 10.1.13
Os : ubuntu 16.10

file: angular2-meteor-base/typings.d.ts

line 3 /// <reference types="@types/underscore" />
error: Cannot find type definition file for '@types/underscore'

line 36 stub(collection: Mongo.Collection);
error: Generic type 'Collection' requires 1 type argument(s)

my tsconfig.json

{
"atom": {
"rewriteTsconfig": true
},
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true,
"lib": [
"es6",
"dom"
],
"emitDecoratorMetadata": true,
"sourceMap": true
},
"exclude": [
"node_modules"
],
"files": [
"both/collections/demo.collection.ts",
"both/models/demo.model.ts",
"client/imports/app/app.component.ts",
"client/imports/app/app.module.ts",
"client/imports/app/demo/demo-data.service.test.ts",
"client/imports/app/demo/demo-data.service.ts",
"client/imports/app/demo/demo.component.test.ts",
"client/imports/app/demo/demo.component.ts",
"client/imports/app/index.ts",
"client/lib/init.test.ts",
"client/main.ts",
"server/imports/server-main/main.test.ts",
"server/imports/server-main/main.ts",
"server/main.ts",
"typings.d.ts"
],
"filesGlob": [
"**/*.ts"
],
"compileOnSave": false,
"buildOnSave": false,
"angularCompilerOptions": {
"genDir": "aot",
"skipMetadataEmit": true
}
}

Boilerplate not working with RC5

If I'm bumping the Angular 2 depencies to RC5 and run npm update, the boilerplate throws a JS error in the browser after starting it with meteor run. The boilerplate should be compatible with the current version of Angular 2.

Uncaught reflect-metadata shim is required when using class decorators

Hi All,

I am trying to follow the steps from https://www.angular-meteor.com/tutorials/socially/angular2/bootstrapping but facing few issues, initially i got the compiler issue, which i resolved from this thread derek-fong/angular2-meteor-boilerplate#3 (comment).

Now i am getting another issue when i started the app using meteor command. Then in the browser local host, i got this error in the console:

Uncaught reflect-metadata shim is required when using class decorators
DecoratorFactory @ core.umd.js:403
(anonymous function) @ app.component.ts:4
meteorInstall.client.app.component.js @ app.component.ts:8
fileEvaluate @ install.js:153
require @ install.js:82
(anonymous function) @ main.ts:5

can someone pls help me on this?

Best Regards,
Mahesh

Meteor CLI does not work in project directory

I'm trying to follow this tutorial for building a whatsapp clone https://angular-meteor.com/tutorials/whatsapp2/meteor/setup.

I had some issues with meteor command not being recognised in bash; but have resolved those.

However I am now stuck as the meteor command does not appear to work within the whatsapp project directory. When I try and run meteor help or meteor add mys:fonts or meteor add-platform android for example it just hangs.

However I have found that I can run meteor help in any other directory above this one fine.

If however, I remove the .meteor directory, the meteor help command works, but the others, fail (correctly?) as they do not recognise the folder as a meteor project.

Any ideas?

directory structure is:

/.meteor
/client
/node_modules
/server
package.json
...etc...

Running on Windows10 and the following Meteor version was installed.
[email protected]

Unable to load sass file

I have created a new component (HomeComponent) and try to inject the local scss file.

import template from './home.component.html';
import style from './home.component.scss';

@Component({
  selector: 'home',
  template,
  styles: [style]
})

However a get the following error.

Uncaught Error: Expected 'styles' to be an array of strings.

It seems that the scss loader is unable to load the content of that file

What generator to use for creating modules

I tried using angular cli to create a component and it is not compatible with the file structure here. And is generating a different way of testing.
What cli should I use on generating components for this project?

Thanks

Build Failed

Below is the build error logs:

Errors prevented bundling:
While processing files with angular2-compilers (for target web.browser):
C:\tools\isobuild\compiler-plugin.js:698:15: 'data' option to addAsset
must be a Buffer or String.
at ResourceSlot.addAsset (C:\tools\isobuild\compiler-plugin.js:698:15)
at InputFile.addAsset (C:\tools\isobuild\compiler-plugin.js:463:24)
at SassCompilerExtended.addCompileResult
(packages/barbatus:css-compiler/compilers/basic_compiler.js:32:15)
at packages/caching-compiler/multi-file-caching-compiler.js:144:14
at packages/caching-compiler/multi-file-caching-compiler.js:97:11
at C:\Users\XXX\AppData\Local\.meteor\packages\angular2-compilers\0.6.3\plugin.Angular2Compilers.os\npm\node_modules\meteor\caching-compiler\node_modules\async\lib\async.js:182:20
at replenish (C:\Users\XXX\AppData\Local\.meteor\packages\angular2-compilers\0.6.3\plugin.Angular2Compilers.os\npm\node_modules\meteor\caching-compiler\node_modules\async\lib\async.js:317:21)
at C:\Users\XXX\AppData\Local\.meteor\packages\angular2-compilers\0.6.3\plugin.Angular2Compilers.os\npm\node_modules\meteor\caching-compiler\node_modules\async\lib\async.js:328:15
at Object.async.forEachLimit.async.eachLimit (C:\Users\XXX\AppData\Local\.meteor\packages\angular2-compilers\0.6.3\plugin.Angular2Compilers.os\npm\node_modules\meteor\caching-compiler\node_modules\async\lib\async.js:221:35)
at SassCompilerExtended.processFilesForTarget
(packages/caching-compiler/multi-file-caching-compiler.js:95:11)
at _loop
(packages/barbatus:css-compiler/compilers/style_compiler.js:20:26)
at StyleCompiler.processFilesForTarget
(packages/barbatus:css-compiler/compilers/style_compiler.js:18:36)

{}/node_modules/angular2-meteor-accounts-ui/build/login-buttons.scss not found in file

Tried to bootstrap app from boilerplate
When installing package and trying to import it's styles get the error

While processing files with angular2-compilers (for target web.browser): /client/main.scss: Scss compiler error: File to import: {}/node_modules/angular2-meteor-accounts-ui/build/login-buttons.scss not found in file: /home/skellige/ng2/snake/{}/client/main.scss

Tried also on twiter bootstrap styles cannot be found in node_modules,
maybe its the error caused by not valid npm package downloaded returns:

meteor npm install --save angular2-meteor-accounts-ui
npm WARN shrinkwrap Excluding devDependency: [email protected] { '@angular/common': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/compiler': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/core': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/forms': '0.2.0',
npm WARN shrinkwrap '@angular/platform-browser': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/platform-browser-dynamic': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/router': '3.0.0-alpha.8',
npm WARN shrinkwrap 'angular2-meteor': '0.6.2',
npm WARN shrinkwrap 'angular2-meteor-accounts-ui': '^0.6.1',
npm WARN shrinkwrap 'angular2-meteor-auto-bootstrap': '0.6.0',
npm WARN shrinkwrap 'angular2-meteor-polyfills': '0.1.1',
npm WARN shrinkwrap 'angular2-meteor-tests-polyfills': '0.0.2',
npm WARN shrinkwrap 'es6-shim': '0.35.1',
npm WARN shrinkwrap 'meteor-node-stubs': '0.2.3',
npm WARN shrinkwrap 'reflect-metadata': '0.1.3',
npm WARN shrinkwrap rxjs: '5.0.0-beta.6',
npm WARN shrinkwrap 'zone.js': '0.6.12' }
npm WARN shrinkwrap Excluding devDependency: [email protected] { '@angular/common': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/compiler': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/core': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/forms': '0.2.0',
npm WARN shrinkwrap '@angular/platform-browser': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/platform-browser-dynamic': '2.0.0-rc.4',
npm WARN shrinkwrap '@angular/router': '3.0.0-alpha.8',
npm WARN shrinkwrap 'angular2-meteor': '0.6.2',
npm WARN shrinkwrap 'angular2-meteor-accounts-ui': '^0.6.1',
npm WARN shrinkwrap 'angular2-meteor-auto-bootstrap': '0.6.0',
npm WARN shrinkwrap 'angular2-meteor-polyfills': '0.1.1',
npm WARN shrinkwrap 'angular2-meteor-tests-polyfills': '0.0.2',
npm WARN shrinkwrap 'es6-shim': '0.35.1',
npm WARN shrinkwrap 'meteor-node-stubs': '0.2.3',
npm WARN shrinkwrap 'reflect-metadata': '0.1.3',
npm WARN shrinkwrap rxjs: '5.0.0-beta.6',
npm WARN shrinkwrap 'zone.js': '0.6.12' }
angular2-meteor-base@ /home/skellige/ng2/snake
└── [email protected]

Meteor.users() is not availabe in canActivate()

I am trying to redirect user to different routes by different scenarios saved in his profile. So for that I need a very rich AuthGaurd on my routes. All I have in canActivate is Meteor.userId(), which is not enough for me. So is there any work around to access complete Meteor.users() subscription in canActivate()?

httpProxy.createProxyServer is not a function

I installed meteor and restarted pc. Meteor appears to be working.

git clone https://github.com/bsliran/angular2-meteor-base.git
meteor npm install
meteor

At this point I get the following error:

C:\Users\jente\AppData\Local\.meteor\packages\meteor-tool\1.4.0\mt-os.windows.x86_32\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:165
      throw error;
      ^

TypeError: httpProxy.createProxyServer is not a function
    at Proxy.start (C:\tools\runners\run-proxy.js:40:28)
    at Runner.start (C:\tools\runners\run-all.js:117:16)
    at Object.exports.run (C:\tools\runners\run-all.js:320:10)
    at Command.doRunCommand [as func] (C:\tools\cli\commands.js:359:17)
    at C:\tools\cli\main.js:1402:23

Also doesn't work after:

meteor update

What do?

Error: There is already a collection named "parties"

Hello guys I am following this tutorial. Everything was working fine for me till step 4.10. Now my app is not being built because of the error Error: There is already a collection named "parties" . As I did some search I tried adding

"compileOnSave": false,
  "buildOnSave": false 

But that doesn't fix the problem. Please help.

Typescript tries to load html-templates as modules

When running this project freshly cloned in Meteor 1.4 I get these messages on the command line:

=> Started proxy.
=> Started MongoDB.
client/imports/demo/demo.component.ts (6, 22): Cannot find module './demo.component.html'.
client/app.component.ts (5, 22): Cannot find module './app.component.html'.
=> Started your app.

=> App running at: http://localhost:3000/

Also the typescript compiler of VSCode says Cannot find module './demo.component.html'

The project does work, but the compiler expects a module instead of a template?

Concerns regarding high CPU/memory

Hello,

I've been developing an app with meteor/angular 2 for few months now and noticed the Node CPU/memory are pretty high (CPU: ~75%, memory ~850MB).
I downloaded this boiler app and noticed an average CPU ~30% and memory ~825MB.
A basic meteor app average CPU ~%10.
All tests run on the same machine (Windows 10x64).
This is concerning to me and was wondering what should be an average for a large app and how to minimize the node CPU process?

Also gradually, the app has been taking more and more time to refresh in the browser on a simple code change. Now it takes almost 2 minutes to reload the app! Any ideas on how to investigate the issue?

Thanks.

Error on typings.d.ts

File typings.d.ts
Error on line 33: import { Mongo } from "meteor/mongo";
Error : Cannot find module 'meteor/mongo'

Tested on Atom and Visual Studio Code with a fresh install

scss component files in this demo do not affect anything

Hello,

I just git clone this repo and tried three things:

  1. Change main.scss to:
body, html {
   h1{
      color: darkviolet;
   }
}

=> works fine
2. Change app.component.scss to:

app {
   background-color: blue;
   h2{
      color: green;
   }
}

=> no result
3. Changed demo.component.scss to:

demo {
	background-color: red;
}

=> again, no result

What is the problem?

Cucumber / Features / Specs

Hello,
Thanks for putting the code together. Helps a lot.
But as you would imagine, there is always something not quite right for every single use people might find.
I wonder if you could add some extras as to allow specs to be run by chimp on /tests/features or /features.
If it is not in short list, could you just give some hints on how I could do it myself. (Thanks)
More specifically, the problem I am having is that Meteor, or something down/up the chain, is not picking .ts files (.js are fine). I wonder if this is the typings records or something else.
The idea is to do BDD(cucumber/chai) and TDD(mocha/chai) top-down, test first.

Thanks and regards,

$ node --version
v6.3.0
$ npm --version
3.10.6
$ npm list --global
/usr/local/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]

$ npm list
angular2-meteor-base@ /Users/...
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

$ cat package.json 
{ . . .
  "devDependencies": {
    "chai": "3.5.0",
    "chai-as-promised": "^5.3.0",
    "chai-spies": "0.7.1",
    "cucumber": "^1.2.1",
    "cucumber-tsflow": "latest",
    "typescript": "1.8.10",
    "typings": "1.3.2"
  }
}
$ cat .meteor/packages 
# . . .
angular2-compilers
barbatus:angular2-runtime
barbatus:typescript
practicalmeteor:mocha
practicalmeteor:chai
xolvio:cleaner
hwillson:stub-collections
dispatch:mocha-phantomjs

$ ls -1AR tests
tests:
    features
tests/features:
    homepage.feature
    steps
tests/features/steps:
    homepage.steps.ts

Term 1:
$ meteor
Term 2:
$ chimp --ddp=http://localhost:3000 --watch --cucumber --chai --path=tests/features
Term 3:
$ meteor test --driver-package practicalmeteor:mocha --port 3010

Quick start broken?

I am having trouble getting this git repository to work.

I first ran git clone https://github.com/bsliran/angular2-meteor-base test3

Then meteor

Then it gives me this error

=> Started proxy.
=> Started MongoDB.
client/imports/app/demo/demo-data.service.ts (1, 28): Cannot find module '@angular/core'.
client/imports/app/demo/demo-data.service.ts (2, 34): Cannot find module 'meteor-rxjs'.
client/imports/app/demo/demo.component.ts (1, 35): Cannot find module '@angular/core'.
client/imports/app/demo/demo.component.ts (2, 28): Cannot find module 'rxjs/Observable'.
client/imports/app/app.component.ts (1, 27): Cannot find module '@angular/core'.
client/imports/app/app.module.ts (1, 26): Cannot find module '@angular/core'.
client/imports/app/app.module.ts (2, 31): Cannot find module '@angular/platform-browser'.
both/collections/demo.collection.ts (1, 33): Cannot find module 'meteor-rxjs'.
client/main.ts (3, 40): Cannot find module '@angular/platform-browser-dynamic'.
client/main.ts (4, 32): Cannot find module '@angular/core'.
client/main.ts (5, 24): Cannot find module 'meteor/meteor'.

Unable to resolve some modules:

  "meteor-rxjs" in /C/Users/Joshua Dowdle/angularMeteor/test3/both/collections/demo.collection.js (web.browser)
  "angular2-meteor-polyfills" in /C/Users/Joshua Dowdle/angularMeteor/test3/client/main.js (web.browser)
  "@angular/platform-browser-dynamic" in /C/Users/Joshua Dowdle/angularMeteor/test3/client/main.js (web.browser)
  "@angular/core" in /C/Users/Joshua Dowdle/angularMeteor/test3/client/imports/app/demo/demo-data.service.js (web.browser)
  "@angular/platform-browser" in /C/Users/Joshua Dowdle/angularMeteor/test3/client/imports/app/app.module.js (web.browser)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save meteor-rxjs angular2-meteor-polyfills @angular


Unable to resolve some modules:

  "meteor-rxjs" in /C/Users/Joshua Dowdle/angularMeteor/test3/both/collections/demo.collection.js (os.windows.x86_32)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save meteor-rxjs

W20161026-19:30:15.405(-6)? (STDERR) C:\Users\Joshua Dowdle\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:280
W20161026-19:30:16.058(-6)? (STDERR)                                            throw(ex);
W20161026-19:30:16.059(-6)? (STDERR)                                            ^
W20161026-19:30:16.060(-6)? (STDERR)
W20161026-19:30:16.060(-6)? (STDERR) Error: Can't find npm module 'meteor-rxjs'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?
W20161026-19:30:16.061(-6)? (STDERR)     at Object.require (C:\Users\Joshua Dowdle\angularMeteor\test3\.meteor\local\build\programs\server\boot.js:200:17)
W20161026-19:30:16.062(-6)? (STDERR)     at options.fallback (packages\modules-runtime.js:445:18)
W20161026-19:30:16.063(-6)? (STDERR)     at require (packages\modules-runtime.js:112:16)
W20161026-19:30:16.064(-6)? (STDERR)     at meteorInstall.both.collections.demo.collection.js (both/collections/demo.collection.ts:1:1)
W20161026-19:30:16.065(-6)? (STDERR)     at fileEvaluate (packages\modules-runtime.js:181:9)
W20161026-19:30:16.069(-6)? (STDERR)     at require (packages\modules-runtime.js:106:16)
W20161026-19:30:16.070(-6)? (STDERR)     at server/main.ts:4:22
W20161026-19:30:16.070(-6)? (STDERR)     at C:\Users\Joshua Dowdle\angularMeteor\test3\.meteor\local\build\programs\server\boot.js:295:34
W20161026-19:30:16.071(-6)? (STDERR)     at Array.forEach (native)
W20161026-19:30:16.072(-6)? (STDERR)     at Function._.each._.forEach (C:\Users\Joshua Dowdle\AppData\Local\.meteor\packages\meteor-tool\1.4.2\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\underscore\underscore.js:79:11)
=> Exited with code: 1
client/imports/app/demo/demo-data.service.ts (1, 28): Cannot find module '@angular/core'.
client/imports/app/demo/demo-data.service.ts (2, 34): Cannot find module 'meteor-rxjs'.
client/imports/app/demo/demo.component.ts (1, 35): Cannot find module '@angular/core'.
client/imports/app/demo/demo.component.ts (2, 28): Cannot find module 'rxjs/Observable'.
client/imports/app/app.component.ts (1, 27): Cannot find module '@angular/core'.
client/imports/app/app.module.ts (1, 26): Cannot find module '@angular/core'.
client/imports/app/app.module.ts (2, 31): Cannot find module '@angular/platform-browser'.
both/collections/demo.collection.ts (1, 33): Cannot find module 'meteor-rxjs'.
client/main.ts (3, 40): Cannot find module '@angular/platform-browser-dynamic'.
client/main.ts (4, 32): Cannot find module '@angular/core'.
client/main.ts (5, 24): Cannot find module 'meteor/meteor'.

When I run the commands it suggests it dose not solve anything.

Any help would be appreciated, thank you.

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.