Code Monkey home page Code Monkey logo

angular2-starter's People

Contributors

thomasconner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

angular2-starter's Issues

Build error on windows

Hi,
When trying to run this sample using npm start the npm build command fails to run on my windows machine.
npm ERR! Windows_NT 10.0.15063 npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: tsc -p src/ npm ERR! Exit status 2`

There were only the following warnings when I ran npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

It seems there is an issue with the typescript compiler?

Login Error not shown correctly

I think this is an angular issue, but when logging in incorrectly the warning message is not shown on the form until I click around on the page. Usually clicking near the title causes the error to show up.

Angular cli production build error

I have converted this to an angular cli project and using ng serve for testing everything works fine. However when I try to do a deployment build using ng build --prod i get the following output

Hash: d66158630321f3f5df8f
Time: 95518ms
chunk    {0} polyfills.f8e6258404ae34860bd1.bundle.js (polyfills) 166 kB {5} [initial] [rendered]
chunk    {1} main.07c5b4c7ab9fbba5e734.bundle.js (main) 305 kB {4} [initial] [rendered]
chunk    {2} scripts.2e850ba0f944426510f4.bundle.js (scripts) 1.36 MB {5} [initial] [rendered]
chunk    {3} styles.3caa1ca2135d07aa51e2.bundle.css (styles) 175 bytes {5} [initial] [rendered]
chunk    {4} vendor.5c617d52805536fe792a.bundle.js (vendor) 1.73 MB [initial] [rendered]
chunk    {5} inline.29495b8474706ce6f600.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in ng:///D:/Users/User/Documents/CMI/angular/cmi-kinvey/src/app/components/auth/signup.component.html (14,22): Property 'username' does not exist on type '{}'.

ERROR in ng:///D:/Users/User/Documents/CMI/angular/cmi-kinvey/src/app/components/auth/signup.component.html (18,22): Property 'password' does not exist on type '{}'.

ERROR in ng:///D:/Users/User/Documents/CMI/angular/cmi-kinvey/src/app/components/auth/signup.component.html (22,22): Property 'firstname' does not exist on type '{}'.

ERROR in ng:///D:/Users/User/Documents/CMI/angular/cmi-kinvey/src/app/components/auth/signup.component.html (26,22): Property 'lastname' does not exist on type '{}'.

ERROR in ng:///D:/Users/User/Documents/CMI/angular/cmi-kinvey/src/app/components/auth/signup.component.html (14,50): Property 'username' does not exist on type '{}'.

ERROR in ng:///D:/Users/User/Documents/CMI/angular/cmi-kinvey/src/app/components/auth/signup.component.html (18,50): Property 'password' does not exist on type '{}'.

ERROR in ng:///D:/Users/User/Documents/CMI/angular/cmi-kinvey/src/app/components/auth/signup.component.html (22,51): Property 'firstname' does not exist on type '{}'.

ERROR in ng:///D:/Users/User/Documents/CMI/angular/cmi-kinvey/src/app/components/auth/signup.component.html (26,50): Property 'lastname' does not exist on type '{}'.

In signup.component.html I am referring to the user object like so:

...
<div class="form-group">
              <label for="username">Username</label>
              <input [(ngModel)]="user.username" name="username" type="text" placeholder="Username" class="form-control"/>
            </div>
            <div class="form-group">
              <label for="password">Password</label>
              <input [(ngModel)]="user.password" name="password" type="password" placeholder="Password" class="form-control"/>
            </div>
            <div class="form-group">
              <label for="firstname">First Name</label>
              <input [(ngModel)]="user.firstname" name="firstname" type="text" placeholder="First Name" class="form-control"/>
            </div>
            <div class="form-group">
              <label for="lastname">Last Name</label>
              <input [(ngModel)]="user.lastname" name="lastname" type="text" placeholder="Last Name" class="form-control"/>
            </div>
            <button type="submit" class="btn btn-primary">Submit</button>
          </form>
        </div>

and in signup.component.ts:

import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Kinvey } from 'kinvey-angular2-sdk';

@Component({
  selector: 'signup',
  moduleId: module.id,
  templateUrl: './signup.component.html',
})
export class SignupComponent {
  user: {};
  error: Kinvey.BaseError;

  constructor(private router: Router) {}

  signup() {
    this.error = undefined;

    Kinvey.User.signup(this.user)
      .then(() => this.router.navigate(['/']))
      .catch((error: Kinvey.BaseError) => {
        this.error = error;
      });
  }
}

It seems the typescript compiler has an issue with user being of type any. Is there any way of getting it to ignore types?

Can't get the starter app to work.

kinvey-angular2 starter error

I was able to follow the instructions up to the NPM Install. Afterwards, when I run npm start, this is the output I get below.

A couple background items are that I am more of a Product Manager/UX Designer/Business Analyst vs. Developer.

Any help is greatly appreciated.

Thanks,

Brandon


npm start

[email protected] prestart /Users/brandon/Kinvey-Angular2
npm run build

[email protected] build /Users/brandon/Kinvey-Angular2
tsc -p src/

src/app/components/files.component.ts(16,18): error TS2339: Property 'find' does not exist on type 'typeof Files'.
src/app/components/profile.component.ts(16,22): error TS2339: Property 'data' does not exist on type 'User'.
src/app/components/upload.component.ts(32,20): error TS2339: Property 'upload' does not exist on type 'typeof Files'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: tsc -p src/
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /var/root/.npm/_logs/2017-04-27T19_11_25_972Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] prestart: npm run build
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /var/root/.npm/_logs/2017-04-27T19_11_25_998Z-debug.log

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.