mean-expert-official / fireloop.io Goto Github PK
View Code? Open in Web Editor NEWModern Real-Time Platform by MEAN Expert
License: Other
Modern Real-Time Platform by MEAN Expert
License: Other
There is an error while creating Angular2 Web using fireloop command
Creating new Angular 2 Application: webapp
The system cannot find the path specified.
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn C:\Users\Shahrukh Shahid\AppData\Roaming\npm\node_modules@mean-exp
ert\fireloop\node_modules\angular-cli\lib\cli\index.js.bin/ng ENOENT
at notFoundError (C:\Users\Shahrukh Shahid\AppData\Roaming\npm\node_modules
@mean-expert\fireloop\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (C:\Users\Shahrukh Shahid\AppData\Roaming\npm\node_modules@
mean-expert\fireloop\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (C:\Users\Shahrukh Shahid\AppData\Roaming\npm\node_m
odules@mean-expert\fireloop\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
At first fireloop command works fine and yields the loopback backend successfully but gives error while generating angular 2 webapp
Use this thread for community questions
We need to generate a package.json within the root of the project that will avoid deployment issues when no having a package.json placed in the root directory,
In addition we should ask for the name of the fireloop project and add it into the package.json
https://github.com/mean-expert-official/model-register/blob/master/index.ts#L33
the wrapper function does not return value, adding a return
solves the problem
When using loopback-generator it request the name of a model, when that happen if the user answer the question it does break the flow.
Update generator-fllb to create models without those issues and also update server reference when creating models
Write other if any:
Hello,
Is there any easy way to configure the listening address of the Angular 2 App, from localhost:4200 to 0.0.0.0:4200 ?
Thanks in advance
J
Newest from NPM
Node: v7.0.0
Npm: v3.10.8
OS: Windows 10 insider
Hey, I tried to install/update fireloop this morning and it doesn't install the packages properly anymore.
Command: npm install -g @mean-expert/fireloop
The reason seems to be the fiber package.
Error message:
First:
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\software\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14931
gyp ERR! command "D:\\software\\nodejs\\node.exe" "D:\\software\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\Users\johnb\AppData\Roaming\npm\node_modules\@mean-expert\fireloop\node_modules\fibers
gyp ERR! node -v v7.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-gyp exited with code: 1
Second:
npm ERR! Windows_NT 10.0.14931
npm ERR! argv "D:\\software\\nodejs\\node.exe" "D:\\software\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@mean-expert/fireloop"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node build.js || nodejs build.js'.
Hey guys, for all the people that wants to be more involved in the FireLoop Project.
Send me an email to [email protected] and I will send you an invite to the FireLoop Slack Channel.
Cheers
Jon
Write other if any:
I am using this version of fireloop (Release 1.0.0-beta.1.3) .
new i issue this command fireloop
After selecting Generate Fireloop Project, it skipped the regular flow of
? What\'s the name of your application? fireloop_project ? Which version of LoopBack would you like to use? 2.x (stable) ? What kind of application do you have in mind? api-server (A LoopBack API server with local User auth)
and it just goes straight to Setting up your new fireloop environment
and creates the project without giving me the chance to set the name of the project and version of loopback
instance remote method, i.e. method name startsWith 'prototype.' results runtime error
Fireloop Alpha 36
In addition to generating TypeScript Models, it would be incredibly useful and significant improve the usability if the models could be define declaratively completely within TypeScript using Decorators in lieu of using JSON files. For instance:
@Model({
dataSource: "db",
...
})
class Author {
@Property({ required: true })
firstName: string;
...
}
The Decorator could simply be wrappers or facade over the existing APIs:
loopback.createModel({
name: 'Author',
properties: {
firstName: 'string',
required: true,
...
},
...
});
FireLoop Version: 1.0.0-alpha.36
When running the "Generate Angular2 Client" option, the following error appear
errorlog.txt
Current
In older version of node there is an error of blocked scoped that could be fixed by adding 'use strict' but I would rather prefer to change that to var and make it backwards compatible.
Reference issue: mean-expert-official/loopback-sdk-builder#173
Write other if any:
FireLoop Version: 1.0.0-beta.1.3 (Fresh install from NPM)
Is there an missing step on the readme here at this repo or on the installation process?
I had to install in my machine the "wcwidth" library in order to initialize the wizard.
Write other if any:
Attempting to follow this tutorial; however, the Room model is not found and it is not installed when I create the client SDK.
These two questions never occur when I am creating the client SDK:
? What SDK features do you want to include?
(*) Enable PubSub + IO + FireLoop functionality
(*) Add default values in models
? Do you want to generate ONLY FireLoop SDK + Auth Services? (Y/n)
Thank you for your help!
I've turned on "debug": true
in my component-config for loopback-component-realtime
.
My base angular2 app it setup exactly like the docs at http://docs.fireloop.io/en/api/#Read-Data-Using-%E2%80%98change%E2%80%99-Event
import { Component } from '@angular/core';
import { BASE_URL, API_VERSION } from './shared/base.url'
import { LoopBackConfig } from './shared/sdk';
import { Nooner, AccessToken, FireLoopRef } from './shared/sdk/models';
import { NoonerApi, RealTime } from './shared/sdk/services';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
private nooner: Nooner = new Nooner();
private friendsRef: FireLoopRef<Nooner>;
constructor(private realTime: RealTime) {
LoopBackConfig.setBaseURL(BASE_URL);
LoopBackConfig.setApiVersion(API_VERSION);
this.realTime
.onReady()
.subscribe(() => {
console.log("check")
this.friendsRef = this.realTime.FireLoop.ref<Nooner>(Nooner)
this.friendsRef.on('change', {
limit: 10,
order: 'id DESC',
include: 'friends'
}).subscribe((friends: Nooner[]) => console.log("EVNT - change", friends))
this.friendsRef.on('value').subscribe((friends: Nooner[]) => {
console.log("EVNT - value", friends)
})
}
);
}
upsert(): void {
console.log("yolo");
this.nooner.username = "asdf99";
this.nooner.password = "asdf";
this.nooner.email = "[email protected]";
this.nooner.location = {lat: 0, lng: 0};
this.nooner.timezone = -8;
console.log("??", this.nooner);
this.friendsRef.create(this.nooner).subscribe((instance: Nooner) => console.log(instance));
}
When the page first loads, I get the console logs with my data, but whenever I add a new one w/ the upsert() function, I do not get the event logs again, EVEN THOUGH the debug shows in the console events are being fires and caught.
@mean-expert/loopback-component-realtime: FireLoop starting create: Nooner: {"data":{"username":"asdf99","password":"asdf","email":"[email protected]","location":{"lat":0,"lng":0},"timezone":-8},"parent":null}
Nooner: Before Save
@mean-expert/loopback-component-realtime: FireLoop value broadcasting
@mean-expert/loopback-component-realtime: FireLoop child_added broadcasting
@mean-expert/loopback-component-realtime: FireLoop change broadcasting
@mean-expert/loopback-component-realtime: FireLoop stats broadcasting
@mean-expert/loopback-component-realtime: FireLoop value broadcast request received: {"limit":100,"order":"id DESC"}
@mean-expert/loopback-component-realtime: FireLoop value broadcast request received: {"limit":100,"order":"id DESC"}
@mean-expert/loopback-component-realtime: FireLoop change broadcast request received: {"limit":10,"order":"id DESC","include":"friends"}
@mean-expert/loopback-component-realtime: FireLoop change broadcast request received: {"limit":10,"order":"id DESC","include":"friends"}
Here you can see my browser's console output. The instance gets logged from the create callback, but the event never gets fired again. I'm really going to want to use realtime data for my application:
https://gyazo.com/2d7afa4a92c001c24f4cf3a8d6ec81f4
.............. What's the matter? How can the events be caught the first time on registry, but then never fire even though they're caught by the server.
I REALLY want to use and love FireLoop, but it's been an insane pain to just get any of the base functionality from the documentation working.
We need to start working in better documentation that also implements i18n, for this we are going to create a new docs directory within this repo, create an hexo project and install the material design template.
In order to have a complete experience in TypeScript, we need to add the typings for a LoopBack App, so can provide a better development experience
1.- Add a copy of the type definitions, within the generator-fireloop templates
2.- When generating the fireloop project, lets add a fireloop/typings/loopback.d.ts file
3.- Update the tsconfig file for the backend adding the following:
{
"files": [
"typings/loopback.d.ts"
]
}
Write other if any:
There is a problem generating projects in Beta 3, where in windows environments we are not getting the API directory name.
Use path.sep will fix the issue regardless the environment
Currently, when configuring the Model decorator, without much effort it can start growing a lot the configurations, leaving the business logic class in the bottom, which leads to a bad development experience.
Lets leave Model decorator only as facade of the function that will be passed to LoopBack and create a couple of decorators to configure remotes and hooks right above the method within the class which makes more sense and is cleaner.
Write other if any:
1.0.0-beta.1.3
I've set up a basic project with one model (called Job) and an Angular2 client application.
Everything is working as expected when I perform operations (create/delete/update) in the client application.
However, when I update the same object on the server using Job.updateOrCreate, no message is received in the client application. Do I have to configure the server (loopback 3) further, or do I need to create a fireloop client on the server and perform all model operations through that client? And, if so, how do I create a fireloop client in the loopback server?
Currently, users can only call fireloop model
from the project root. I think it would be a great idea to add support for calling fireloop model
from the generated api directory, where loopback generator functions are typically called. This would be similar to calling fireloop sdk
from within the generated angular directory, which is already supported.
Write other if any:
The directory that is used to install the fireloop server component (./fireloop
) should be made configurable just like the directory for the Angular client app.
While the default is fine, there are use cases where people want to have the ability to change this for whatever reason. For instance, in my project I prefer using api
and admin
instead for fireloop
and webapp
.
I'm happy to create a PR to add support for this, this issue is to start the discussion and track progress.
I was reading this new post
https://github.com/mean-expert-official/loopback-sdk-builder/wiki/8.-(NEW)-FireLoop-API#how-to-create-data
Will there be integration with React? React ecosystem have React-Native, and FireLoop can be really useful for native apps built by React-Native
Hey, I've tried running the cli. The problem is that it just closes my cmd. No output or whatsoever.
I guess it just not intended to work, right?
Templates are behind from what the SDK Builder is generating, the generator templates need to be updated to install the right modules
Write other if any:
The following example shows, how i can querying data with the built in LoopBack Query Language:
constructor(private realTime: RealTime) {
this.realTime
.onReady()
.subscribe(() =>
this.RoomReference = this.realTime.FireLoop.ref<Room>(Room)
this.RoomReference.on('change',{
limit: 10,
order: 'id DESC',
include: 'members'
}).subscribe((rooms: Room[]) => console.log(rooms));
);
}
This works wunderfull!
Now i would like to create a fulltext (match against) query and i found this example:
https://github.com/strongloop/loopback/issues/615
var mySQLDataSource = app.dataSources.mysql;
var mySQLPool = mySQLDataSource.connector.client;
mySQLPool.query('SELECT * FROM TABLE WHERE MATCH(title, body) AGAINST (\'LOOPBACK\')', function(err, rows, fields) {
if (err) throw err;
...
});
Any idea how I can realize a "native" fulltext query, with fireloop and the mysql driver?
Sorry for my language :)
Cheers
Christian
Write other if any:
FireLoop Version: 1.0.0-beta.1.3
I run the fireloop command, and after a while I get an error. Here is my terminal log
➜ fireloop_project fireloop
_-----_ ╭──────────────────────────╮
| | │ Welcome to FireLoop! │
|--(o)--| │ The MEAN Stack Platform │
---------´ │ by MEAN Expert │ ( _´U
_ ) ╰──────────────────────────╯
/A\ /
| ~ |
'..'_
´ |° ´ Y
? What do you want to do? Generate Angular2 Client
? What type of Angular 2 Application do you want to create? Angular 2 for Web
? What's the name of your application? webapp
Creating new Angular 2 Application: webapp
installing ng2
create .editorconfig
create README.md
create src/app/app.component.css
create src/app/app.component.html
create src/app/app.component.spec.ts
create src/app/app.component.ts
create src/app/app.module.ts
create src/assets/.gitkeep
create src/environments/environment.prod.ts
create src/environments/environment.ts
create src/favicon.ico
create src/index.html
create src/main.ts
create src/polyfills.ts
create src/styles.css
create src/test.ts
create src/tsconfig.json
create angular-cli.json
create e2e/app.e2e-spec.ts
create e2e/app.po.ts
create e2e/tsconfig.json
create .gitignore
create karma.conf.js
create package.json
create protractor.conf.js
create tslint.json
Successfully initialized git.
Installing packages for tooling via npm.
Installed packages for tooling via npm.
_-----_
| | ╭──────────────────────────╮
|--(o)--| │ Building your FireLoop │
---------´ │ SDK! │ ( _´U
_ ) ╰──────────────────────────╯
/A\ /
| ~ |
'..'_
´ |° ´ Y
Generating: webapp/src/app/app.module.ts
Generating: webapp/src/tsconfig.json
Generating: webapp/src/typings.d.ts
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn /bin/sh ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
Write other if any:
1.0.0-beta.2.4
When using the Fireloop CLI command Generate Angular2 SDK the command line options are not being used by the Fireloop:SDK generator. No matter which client is selected the SDK for the default webapp is generated.
The command line choices should be passed to the generator in an options object as options.clientPath and options.clientType but in my install the choices are actually found in options.options.clientPath and options.options.clientType respectively.
bitingedgemick@685d169 shows the changes that are working for me.
The installation is on Windows 10 just in case that may be relevant to the issue.
Write other if any:
Hello.
I have generated nativescript client for fireloop
But cant run.
When i run "fireloop serve" and choice serverside and clientside
Me give error:
events.js:160
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'cmd' of undefined
Write other if any:
Hello,
i am new in loopback/mean.expert and try to broadcast data from server side. on client side fileloop realtime data sycroniztion work fine. but i require to broadcast data from server side (eg. take BTC rate from other website on server/api and broadcast it to our client).
i am try using it by NEW IO Module Example but it not works. tested code given below:
Server Side Code
module.exports = function (app) { app.on('started', function () { app.mx.IO.emit('test', 'Hello World'); }); };
Client Side Code
import { Component, OnInit } from '@angular/core';
import { RealTime } from '../shared/sdk/services';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
constructor(private realTime: RealTime) { this.realTime.IO.emit('test', 'hello publish it');
this.realTime.IO.emit('test', 'raj angular');
this.realTime.IO.on('test').subscribe((msg: any) => console.log('Realtime Cli Msg ='+ msg));
}
ngOnInit() {
}
}
above code is not working. so please provide me solution for server side broadcasting.
Is it works on your system or not?
Newest from npm
Just wondering whether or not fireloop currently supports the pre-release version of loopback v3?
This won't allow to create client applications
alpha.38
Currently there is no way to decide if the SDK will be fireloop-only, io enabled, etc. A UI needs to be created in order to let users set these values while using the fireloop-cli
Write other if any:
Hey mean-expert Team,
actually a build prototype with fireloop and the web client and now i want to add the NativeScript to build an native app, with the original code of my prototpye...
Is there exist an example how to use fireloop combined with web client and mobile client (nativeScript)?
My goal is to develop the code only once and then as a webapp and as a native app to provide.
Is it possible at all?
Sorry for my language... ;-)
Fireloop is amazing <3
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.