Coder Social home page Coder Social logo

colinskow / angular-electron-dream-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from patrickjs/patrickjs-starter

162.0 162.0 54.0 3.71 MB

:tada: An Angular Electron Starter kit featuring Webpack, Angular 4 (Router, Http, Forms, Services, ngrx, Tests, E2E, Coverage), Karma, Spectron, Jasmine, Istanbul, and TypeScript

License: MIT License

JavaScript 62.32% TypeScript 35.02% CSS 0.55% HTML 2.11%
angular angular2 electron hmr ngrx webpack webpack2

angular-electron-dream-starter's People

Contributors

abdulhaq-e avatar asgerjensen avatar chriscurnow avatar colinskow avatar dherges avatar dotcs avatar foxandxss avatar greenkeeperio-bot avatar janrubio avatar jennyraj avatar jhuntoo avatar jimthedev avatar joshwiens avatar katallaxie avatar ktong avatar kulshekhar avatar mgechev avatar nehrdani avatar ocombe avatar opporancisis avatar patrickjs avatar samvloeberghs avatar sekibomazic avatar shlomiassaf avatar spittal avatar stefh avatar tamascsaba avatar valorkin avatar vivainio avatar vsfedorenko 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  avatar  avatar  avatar  avatar

angular-electron-dream-starter's Issues

package:windows fails

  • I'm submitting a ...
    [ * ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • What is the current behavior?
    npm run package:windows fails with Exit status 4294967295

  • Please tell us about your environment:
    i ran the latest source codes of [email protected] without any changes

npm install -> npm build:prod -> npm run launch -> npm run packages:windows -> failed

Attached debug log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'package:windows' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prepackage:windows',
4 verbose run-script   'package:windows',
4 verbose run-script   'postpackage:windows' ]
5 info lifecycle [email protected]~prepackage:windows: [email protected]
6 info lifecycle [email protected]~package:windows: [email protected]
7 verbose lifecycle [email protected]~package:windows: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~package:windows: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\lx\Downloads\angular-electron-dream-starter\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\IVI Foundation\VISA\Win64\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\ktvisa;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\bin;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files (x86)\IVI Foundation\VISA\winnt\agvisa;C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v716\runtime\win32;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\WebEx\PTools020000000;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;C:\Program Files\nodejs\;C:\Users\louislow\AppData\Local\Microsoft\WindowsApps;C:\Users\lx\AppData\Local\atom\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\lx\AppData\Roaming\npm
9 verbose lifecycle [email protected]~package:windows: CWD: C:\Users\lx\Downloads\angular-electron-dream-starter
10 silly lifecycle [email protected]~package:windows: Args: [ '/d /s /c', 'rimraf packages/win/* && build --win --x64' ]
11 silly lifecycle [email protected]~package:windows: Returned: code: 4294967295  signal: null
12 info lifecycle [email protected]~package:windows: Failed to exec package:windows script
13 verbose stack Error: [email protected] package:windows: `rimraf packages/win/* && build --win --x64`
13 verbose stack Exit status 4294967295
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:289:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\lx\Downloads\angular-electron-dream-starter
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "package:windows"
18 verbose node v8.5.0
19 verbose npm  v5.3.0
20 error code ELIFECYCLE
21 error errno 4294967295
22 error [email protected] package:windows: `rimraf packages/win/* && build --win --x64`
22 error Exit status 4294967295
23 error Failed at the [email protected] package:windows script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 4294967295, true ]

Cannot invoke an expression whose type lacks a call signature

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ...
    [* ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

at-loader error found when running npm start

[at-loader] ./src/app/reducers/index.ts:36:12
    TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures.

index.ts

const DEV_REDUCERS = [stateSetter, storeFreeze, storeLogger()];
**const developmentReducer = compose(...DEV_REDUCERS, combineReducers)(reducers);**
const productionReducer = compose(combineReducers)(reducers);

export function rootReducer(state: any, action: any) {
  if (ENV !== 'development') {
    return productionReducer(state, action);
  } else {
    **return developmentReducer(state, action);**
  }
}

Compatibility with use of browser

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    Well... There is a Dockerfile for web browsing the dist/ folder with Nginx, so I guess this is a bug. If it was never planned to be used with a browser, then it's a feature request, or a need for advice about what to do to get it.

  • What is the current behavior?
    Using this project with normal web browsing produces a blank page and an error in the browser console: missing "require" dependency.

ReferenceError: require is not defined [Learn More]
  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
yarn install
yarn build
docker build -t dream-starter:latest .
docker run -p 80:80 dream-starter:latest

Open a browser at http://localhost

  • What is the expected behavior?
    I am sure that the popup window with ipc won't work. But it would be cool if the non-native features could work also in a browser, or to have at least the layout of the application.

  • What is the motivation / use case for changing the behavior?
    My use case is to share my application with others while it is in development, via the web, to get its global picture.

  • Please tell us about your environment:
    Ubuntu, Firefox, yarn

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
    I am a beginner with Electron and Webpack. I guess this issue has something to do with Webpack. Would it be possible to fix this just by adding a webpack configuration for web-browsing?

Packaging for linux cannot fetch appimage-9.0.1

  • I'm submitting a ...
    [x ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    Report a bug

  • What is the current behavior?
    When running npm run package:linux I get this:

Packaging for linux x64 using electron 1.7.9 to packages/linux-unpacked
Building AppImage for arch x64
Building Snap for arch x64
Unable to find image 'electronuserland/builder:latest' locally
Downloading appimage-9.0.1, please wait
docker: Error response from daemon: Get https://registry-1.docker.io/v2/electronuserland/builder/manifests/latest: unauthorized: incorrect username or password.
See 'docker run --help'.
Error: docker exited with code 125
at ...
  • Please tell us about your environment:
    Building on macOS High Sierra 10.13.1

Preloading Strategy & Lazy Loaded Modules

[ *] question about the decisions made in the repository

  • What is the current behavior?
    Currently the routing preloading strategy is set to PreloadAllModules.
    What is purpose of this when demonstrating lazy loaded modules?
    Yes technically they are still lazy loaded after initial load. but when managing state of an application and state is loaded asynchronously this kind of defeats the purpose doesn't it?
    All modules not protected by a CanLoad guard will be loaded immediately.

Please refer to this question on NGRX

Angular 6 Upgrade

Thanks for this great seed.

Angular 5 was released and I would love to know the plans of supporting angular 5 in the near future. As ngc-webpack was updated by wrapping ngtool/webpack, this should be feasible without too many changes.

Or maybe its better to wait until angular-starter has finished the migration?

Thanks a lot for sharing your plans :)

NGRX Examples

[* ] question about the decisions made in the repository

  • What is the current behavior?
    Currently the seed only shows example of root state.

  • What is the motivation / use case for changing the behavior?
    The seed implements async (lazy loaded) modules so including a simple example of async state only makes sense as there are subtle differences in the selectors you create for those slices of state and could lead to confusion.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Possibly we could include a simple example of the Effects module of ngrx as well?

Unable to change packed filename executable

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ...
    [ * ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    A Question

  • What is the current behavior?
    Changing package.json version from 7.0.0 to 8.0.0 did not change the name of the packages,
    Angular Electron Dream Starter Setup 7.0.0.exe to Angular Electron Dream Starter Setup 8.0.0.exe.

I ran build:prod and package:windows

  • What is the expected behavior?
    Packed filename: Angular Electron Dream Starter Setup 8.0.0.exe

Current environment: I just downloaded the latest source code with no changes expect the above.

Wrong .node module (native binding) included in build

I've recently pulled the upstream changes from this repository. Running into a problem when I attempt to do any of the following:
npm start
npm run build:prod
npm run build:aot

The included build of a native node module (better-sqlite3 in this case) is not correct and so the app fails while loading it with exception:

Uncaught Error: A dynamic link library (DLL) initialization routine failed.
\?\D:\src\TAnalyzeElectron\dev\node_modules\better-sqlite3\build\Release\better_sqlite3.node
at process.module.(anonymous function) [as dlopen]

Builds built with:
npm run build:dev
and run with
npm run launch
work.

Here is what I've done to try to correct it:
delete the node_modules directory
delete the node_modules_electron directory
npm install
.\node_modules.bin\electron-rebuild.cmd -f -w better-sqlite3
npm run install-app-deps

the .\node_modules.bin\electron-rebuild.cmd -f -w better-sqlite3 rebuilds the native dependency and when I look in
TAnalyzeElectron\node_modules\better-sqlite3\build\Release
the .node file appears to be built correctly. And if I manually copy this .node file to any of the builds that don't work, they work.

When I look at the file in
TAnalyzeElectron\node_modules_electron\node_modules\better-sqlite3\build\Release
the .node file there is different in size and not correct.

The start, build:prod, build:aot etc builds seem to copy the .node file from under the node_modules_electron directory, while the build:dev build appears to take it from under the node_modules directory.

From what I can see the install-app-deps script is supposed to rebuild the native modules for me, and I believe it did this for me before I updated. However it appears there have been no changes to this script. So I'm wondering where to look for the failure? What would cause this script to build the module for the wrong Electron/OS? Do you think this is a problem with electron-builder? I'm on Windows.

I'm working around the problem by copying in the correct build to node_modules_electron\node_modules\better-sqlite3\build\Release, then npm start, npm run build:prod etc get the right .node module.

Thanks for any insight.

Build Website Bundle

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ...
    [ ] bug report
    [ x] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    This would be nice for having the same app run on Desktop and in browser.

  • What is the current behavior?
    The Build does not work in browser, require issues.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
    https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).

  • What is the expected behavior?

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:

  • Angular version: 2.0.0-beta.X
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Splash screen when main window is loading

Is it possible to create a Splash screen when main window is loading in this starter project?

I have tried to create a loading.html which is in the same directory level with index.html

src  
| ------- loading.html
| ------- index.html
| ------- electron
          | ------- index.ts

loading.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
  <h1>TEST SPLASH SCREEN WHEN APP START UP</h1>
</body>
</html>

index.ts

let win,
  windowParams = {
    frame: false,
    width: 1024,
    height: 700,
    minWidth: 1024,
    minHeight: 700,
    icon: __dirname + 'neutron.png',
    show: false,
    webPreferences: {
      devTools: true
    }
  };

let loadingScreen,
  loadingParams = {
    frame: false,
    width: 400,
    height: 200,
    moveable: false,
    resizable: false,
    backgroundColor: '#34343B',
    show: true,
    webPreferences: {
      devTools: true
    }
  };
function createWindow() {
  win = new BrowserWindow(windowParams);

  win.webContents.on('did-finish-load', () => {
    win.show();

    if (loadingScreen) {
      loadingScreen.close();
    }
  });

  // and load the index.html of the app.
  win.loadURL(`file://${__dirname}/index.html`);
}

function createLoadingScreen() {
  loadingScreen = new BrowserWindow(Object.assign(loadingParams, { parent: win }));
  loadingScreen.loadURL(`file://${__dirname}/loading.html`);
  loadingScreen.on('closed', () => loadingScreen = null);

  loadingScreen.webContents.on('did-finish-load', () => {
    loadingScreen.show();
  });
}

app.on('ready', () => {
  createLoadingScreen();
  createWindow();
});

loading.html did not load but I could see the color of backgroundColor: '#34343B'.

Did i missed out any steps to create the loading window?

Reload is not available with electron

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ...
    [ ] bug report
    [x ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    Is it possible to reload the application when a refresh is executed during the launch ?

  • What is the current behavior?
    For the moment after a refresh the application is not longer availaible (blanck page).
    I suppose It's because webpack is injecting the scripts in a specific way...

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
    https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).

  • What is the expected behavior?
    The application should reload and hit the route 'home /'

  • What is the motivation / use case for changing the behavior?
    Better dev environment.

  • Please tell us about your environment:

  • Angular version: 4.x
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Adding a 3rd party library such as PrimeNG

Hello,

I'm having a hard time adding any 3rd party modules. I've tried PrimeNG and ag-grid, with little success. I have been successful at adding a 3rd party module to the base repository ( AngularClass/angular2-webpack-starter). I then try to replicate what I did with an instance of this repository and I end up with odd errors on load:

Error: Unexpected value 'AccordionModule' imported by the module 'AppModule'. Please add a @NgModule annotation.
at syntaxError (file:///D:/devtools/js/tutorials/angular-electron-dream-starter/dist/vendor.dll.js:16427:34) []
at file:///D:/devtools/js/tutorials/angular-electron-dream-starter/dist/vendor.dll.js:29321:44 []
at Array.forEach (native) []
at CompileMetadataResolver.vendor_lib.136.CompileMetadataResolver.getNgModuleMetadata (file:///D:/devtools/js/tutorials/angular-electron-dream-starter/dist/vendor.dll.js:29304:49) []
at JitCompiler.vendor_lib.136.JitCompiler._loadModules (file:///D:/devtools/js/tutorials/angular-electron-dream-starter/dist/vendor.dll.js:40485:64) []

I've found this on the web angular/angular#15763 but not sure how that relates to this project.

First this is what I did to get PrimeNG to work with a fresh clone of AngularClass/angular2-webpack-starter:

  • git clone https://github.com/AngularClass/angular2-webpack-starter.git
  • npm install
  • cd angular2-webpack-starter
  • npm start
    everything goes ok
    Now add PrimeNG and font-awesome
  • stop the server
  • npm install --save primeng
  • npm install --save font-awesome
    open /config/webpack.common.js
    change line ~286 to:
new CopyWebpackPlugin([
        { from: 'src/assets', to: 'assets' },
        { from: 'src/meta'},
        {
          from: 'node_modules/font-awesome/css/font-awesome.min.css',
          to: 'assets/font-awesome/css/font-awesome.min.css'
        },
        {
          from: 'node_modules/font-awesome/fonts',
          to: 'assets/font-awesome/fonts'
        },
        { from: 'node_modules/primeng/resources', to: 'assets/primeng/resources' }
      ]),

open /config/head-config.common.js
add following line ~40
/** tags for primeng and font-awesome **/
{ rel:"stylesheet", type:"text/css", href:"/assets/primeng/resources/themes/omega/theme.css" },
{ rel:"stylesheet", type:"text/css", href:"/assets/primeng/resources/primeng.min.css" },
{ rel:"stylesheet", type:"text/css", href:"/assets/font-awesome/css/font-awesome.min.css" }

open /src/app/app.module.ts
add line 2
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
add line 32
import { AccordionModule } from 'primeng/components/accordion/accordion';
add BrowserAnimationsModule and AccordionModule (this is from primeng) to imports (line ~61):

imports: [ // import Angular's modules
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    HttpModule,
    AccordionModule,
    RouterModule.forRoot(ROUTES, { useHash: true, preloadingStrategy: PreloadAllModules })
  ],

in /src/app/home/home.component.ts line 3 add

<p-accordion>
        <p-accordionTab header="Godfather I" [selected]="true">
            The story begins as Don Vito Corleone, the head of a New York Mafia family, overseeshis daughter's wedding. His beloved son ichael has just come home from the war, but does not intend to become part of his father's business. T hrough Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family.
        </p-accordionTab>
        <p-accordionTab header="Godfather II">
            Francis Ford Coppola's legendary continuation and sequel to his landmark 1972 film, The_Godfather parallels the young Vito Corleone's rise with his son Michael's spiritual fall, deepening The_Godfather's depiction of the dark side of the American dream. In the early 1900s, the child Vito flees his Sicilian village for America after the local Mafia kills his family. Vito struggles to make a living, legally or illegally, for his wife and growing brood in Little Italy, killing the local Black Hand Fanucci after he demands his customary cut of the tyro's business. With Fanucci gone, Vito's communal stature grows.
        </p-accordionTab>
        <p-accordionTab header="Godfather III">
            After a break of more than  15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family. Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate.
        </p-accordionTab>
    </p-accordion>
<p-accordion>
        <p-accordionTab header="Godfather I" [selected]="true">
            The story begins as Don Vito Corleone, the head of a New York Mafia family, overseeshis daughter's wedding. His beloved son ichael has just come home from the war, but does not intend to become part of his father's business. T hrough Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family.
        </p-accordionTab>
        <p-accordionTab header="Godfather II">
            Francis Ford Coppola's legendary continuation and sequel to his landmark 1972 film, The_Godfather parallels the young Vito Corleone's rise with his son Michael's spiritual fall, deepening The_Godfather's depiction of the dark side of the American dream. In the early 1900s, the child Vito flees his Sicilian village for America after the local Mafia kills his family. Vito struggles to make a living, legally or illegally, for his wife and growing brood in Little Italy, killing the local Black Hand Fanucci after he demands his customary cut of the tyro's business. With Fanucci gone, Vito's communal stature grows.
        </p-accordionTab>
        <p-accordionTab header="Godfather III">
            After a break of more than  15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family. Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate.
        </p-accordionTab>
    </p-accordion>

go back to command line and do:
npm start
you should see:
image

Everything works.

I repeat the above steps but instead clone this repository. I run into two problems:

  • The exception noted above
  • Resource load failures
    Failed to load resource: net::ERR_FILE_NOT_FOUND primeng.min.css
    Failed to load resource: net::ERR_FILE_NOT_FOUND font-awesome.min.css
    Failed to load resource: net::ERR_FILE_NOT_FOUND theme.css
    Although even with the resource load failure it should at least run, just not look good.

Any hints on what steps I should follow when adding a module like PrimeNG to this?

Things I've tried:

  • update the version of Angular to 4.0.3 from 4.0.2, no effect.

Thanks
Greg.

'firebase-admin' npm package throws an error.

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?

I believe this is a bug

  • What is the current behavior?

This is a bug report, i believe webpack build for main.electron.ts does not loads json files properly.

I am trying to run the firebase-admin inside electron (not the web part). When it do

import * as firebase from 'firebase-admin';
import { default as config } from './firebase-config';

firebase.initializeApp({
  credential: firebase.credential.cert(config),
  databaseURL: 'https://***.firebaseio.com'
});

the firebase-admin is running fine, but along the way, it throws an error first.

ERROR in [at-loader] ./src/electron/nest/firebase-config.ts:2:3
    TS2345: Argument of type '{ "type": string; "project_id": string; "private_key_id": string; "private_key": string; "client_...' is not assignable to parameter of type 'string | ServiceAccount'.
  Object literal may only specify known properties, and '"type"' does not exist in type 'string | ServiceAccount'.

As you can see, i have rename the certificate file from a ".json" to ".ts", and modified the certificate file to have

export default {
}

it is because json does not loads propely, something to do with tsconfig or webpack config?.

PS: To make it run alright, i had to add this to my environment settings before installing packages, to make the binaries build them from source.

PPS: for everybody else, please note that you must have python2 available when building packages. If you have python3 as default, just make sure path to python2 is in your path.

export npm_config_target=1.7.9
# The architecture of Electron, can be ia32 or x64.
export npm_config_arch=x64
export npm_config_target_arch=x64
# Download headers for Electron.
export npm_config_disturl=https://atom.io/download/electron
# Tell node-pre-gyp that we are building for Electron.
export npm_config_runtime=electron
# Tell node-pre-gyp to build module from source code.
export npm_config_build_from_source=true
  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
    https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).

  • What is the expected behavior?

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:

  • Angular version: 2.0.0-beta.X
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

electron-builder structure change

^ on electron-builder package, on fresh installs is pulling in a version that has a different structure and breaks the install-app-deps helper.

npm install and start issue on window 10

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?

Report a bug.

  • What is the current behavior?

Running npm istall is generating an error

hi first of all compliment for your work. I´m trying to run in and after run npm install I´m getting the following error:

[email protected] install C:\git\angular-electron-dream-starter\node_modules\fcopy-pre-bundled
node-gyp rebuild

C:\git\angular-electron-dream-starter\node_modules\fcopy-pre-bundled>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp: binding.gyp not found (cwd: C:\git\angular-electron-dream-starter\node_modules\fcopy-pre-bundled) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16)
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.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\git\angular-electron-dream-starter\node_modules\fcopy-pre-bundled
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
[email protected] C:\git\angular-electron-dream-starter
`-- UNMET PEER DEPENDENCY [email protected]

I fixed it upgrating electron-builder to 19.2.5.

  • Please tell us about your environment:

window 10, node 6.11.0 and npm 3.10.10

Tests are timing out, increase in time also gives same result

We have made no changes to the karma.conf file. It is taking a lot of time to create the testbed

Disconnected (1 times), because no message in 10000 ms.
Electron 1.7.9 (Node 7.9.0) ERROR
Disconnected, because no message in 10000 ms

Here is the testBed:

 `const mockNgZone = jasmine.createSpyObj('mockNgZone', ['run', 'runOutsideAngular'])
 mockNgZone.run.and.callFake(fn => fn())

TestBed.configureTestingModule({
  imports: [ReactiveFormsModule, MaterialModules, RouterTestingModule],
  declarations: [SigninComponent, LoaderComponent]
}).overrideComponent(SigninComponent, {
  set: {
    providers: [MatSnackBar, {
      provide: Router, useClass: RouterTestingModule
    },
      {
        provide: ActivatedRoute, useValue: {
          snapshot: { params: Observable.of({ email: '[email protected]' }) }
        }
      }, {
        provide: NgZone, useValue: mockNgZone
      }, LoaderService, FormBuilder, StoreOperationService]
  }
}).compileComponents()`

False positive e2e tests.

  • I'm submitting a ...
    [x ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    Report a bug

  • What is the current behavior?
    false positive e2e test results

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

See this fork. I modified the test, but when I build and test, all tests are green.
https://github.com/readme42/angular-electron-dream-starter/tree/bugfix/brokenEnd2EndTests

  • What is the expected behavior?
    Tests are failing

Cannot find type definition file for 'electron'

Windows 10, already electron-rebuild procedure but I'v got error that 'Cannot find type definition file for electron',

E:\ElectronDev\angular-electron-dream-starter (master) ([email protected])
λ yarn run build:dev
yarn run v0.24.5
$ npm run clean:build && npm run prep:dist && npm-run-all -p build:main:dev build:renderer:dev

[email protected] clean:build E:\ElectronDev\angular-electron-dream-starter
rimraf dist dev compiled *.temp.json

[email protected] prep:dist E:\ElectronDev\angular-electron-dream-starter
ncp node_modules_electron dist && rimraf dist/yarn.lock

yarn run v0.24.5
yarn run v0.24.5
$ webpack --config config/webpack.electron.js --progress --profile $ webpack --config config/webpack.dev.js --progress --profile

DLL: Checking if DLLs are valid.
DLL: All DLLs are valid.
0% compiling 10% building modules 0/1 modules 1 active ...ream-starter\src\polyfi 10% building modules 0/1 modules 1 active ...on-dream-starter\src\main.electron.ts
[at-loader] Using [email protected] from typescript and "tsconfig.json" from E:\ElectronDev\angular-electron-dream-starter\tsconfig.main.temp.json.
10% building modules 0/2 modules 2 active ...ron-dream-starter\src\main.browser.ts[at-loader] Using [email protected] from typescript and "tsconfig.json" from E:\ElectronDev\angular-electron-dream-starter\tsconfig.build.temp.json.
708ms building modules
2ms sealing
0ms optimizing
1ms basic module optimization
0ms module optimization
1ms advanced module optimization
0ms basic chunk optimization
0ms chunk optimization
1ms advanced chunk optimization
0ms module and chunk tree optimization
1ms module reviving
0ms module order optimization
1ms module id optimization
1ms chunk reviving
0ms chunk order optimization
1ms chunk id optimization
3ms hashing
1ms module assets processing
4ms chunk assets processing
0ms additional chunk assets processing
1ms recording
0ms additional asset processing
8ms chunk asset optimization
94% asset optimization
[at-loader] Checking started in a separate process...

[at-loader] Checking finished with 1 errors 307ms asset optimization
14ms emitting
Hash: 8a3b499b508c1b69e91c
Version: webpack 2.6.1
Time: 1078ms
Asset Size Chunks Chunk Names
index.js 7.89 kB 0 [emitted] index
index.js.map 7.81 kB 0 [emitted] index
[1] ./src/electron/index.ts 2.22 kB {0} [built]
[] -> factory:10ms building:62ms = 72ms
[2] ./src/electron/dev-extensions.ts 808 bytes {0} [built]
[] -> factory:7ms building:26ms dependencies:0ms = 33ms
[3] ./src/main.electron.ts 57 bytes {0} [built]
factory:15ms building:602ms = 617ms
+ 5 hidden modules

ERROR in [at-loader] TS2688: Cannot find type definition file for 'electron'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build:main:dev" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

E:\ElectronDev\angular-electron-dream-starter (master) ([email protected])
λ

Debug with Visual Studio Code

Just wondering what your development process is for using Visual Studio code to debug your Electron
instance. Is it possible to use VS Code to debug the instance started with hot module replacement (npm run start)? I've tried to use a launch configuration to attach to the process ("request": "attach") but haven't been successful. I have been able to debug an instance started from VS Code ("request": "launch").
To do so I had to:
edit /config/webpack.dev.js and change (line 53)
devtool: 'cheap-module-source-map'
to
devtool: 'source-map'
Build with:
npm run build:dev

Then modify the included launch configuration slightly so the source maps were found:

      {
            "name": "Debug Dev Renderer Process",
            "type": "chrome",
            "request": "launch",
            "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
            "runtimeArgs": [
              "${workspaceRoot}/dist",
              "--enable-logging",
              "--remote-debugging-port=9222"
            ],
            "sourceMaps": true,     
            //"trace": "verbose",       
            "webRoot": "${workspaceRoot}"             
        }

The only change is webRoot was changed from:

"webRoot": "${workspaceRoot}/dist"

to

"webRoot": "${workspaceRoot}"

Note I ran a build:dev but started a debug against the "dist" directory. This seems counter intuitive.

With this approach I'm having to manually build to pick up any source changes (stop debugging, npm run build:dev, launch debug). If I do "npm run watch" my sources get auto built on a source change but if there is a debug instance running the debugger loses sync (break points no longer hit).

So I figured starting an instance with HMR would be the answer. But no luck doing so. Is my only debug option for HMR the embedded Chrome debugger?

Thanks.
Greg.

  • Please tell us about your environment:
    Windows 8.1
    Visual Studio Code:

Version 1.10.2
Commit 8076a19fdcab7e1fc1707952d652f0bb6c6db331
Date 2017-03-08T14:02:52.799Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

NPM --version: 3.10.10
webpack 2.2.1
vscode-chrome-debug-core: 3.14.14

Debugging test cases

I'm using 'npm run watch:test' to run the unit tests, which run fine. However if I open a browser at:

http://localhost:9876/#

and press the debug button shown on that page, I am unable to debug. I open the dev tools, go to the sources tab, browse to a file to debug (say home.component.spec.ts), set a breakpoint, then refresh the browser window. I see an exception in the console:

Observable":1 Uncaught ReferenceError: require is not defined
at Object.webpack_exports.c (Observable":1)
at webpack_require (bootstrap 221f0e1…:49)
at Object. (bootstrap 221f0e1…:147)
at webpack_require (bootstrap 221f0e1…:49)
at Object. (testing.es5.js:1)
at webpack_require (bootstrap 221f0e1…:49)
at Object.exports.compose.functions (spec-bundle.js:25)
at webpack_require (bootstrap 221f0e1…:49)
at Object.defineProperty.value (bootstrap 221f0e1…:147)
at bootstrap 221f0e1…:147
at EmptyError":1

Is there a step I'm missing to be able to debug the test scripts?

If I perform these same steps using the AngularClass/angular2-webpack-starter project I can debug the test scripts.

Thanks

Could not draw <table> in detail.component.ts template

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ...
    [ x ] weird issue report

  • What is the current behavior?
    Tried to draw a HTML < table > but with this tag, it is unable to render the view. Electron hanged for a few minutes and throw an error in the console.

Weird problem. Did I do something wrong?

ERROR Error: Uncaught (in promise): RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at Map.get (native)
    at tokenKey (file:///C:/Users/xxxxx/dev/vendor.dll.js:63950:47)

UPDATE: Turned out that changing back the original value to selector: 'detail' fixed the issue. My selector was 'table'. It was a dumb mistake. Issue closed.

Stop the webpack watcher when the electron app is closed

  • I'm submitting a ...
    [ ] bug report
    [x] feature request
    [ ] question about the decisions made in the repository

  • What is the current behavior?
    When closing the electron app, the webpack watcher remains running, forcing the dev to interrupt it.

  • What is the expected behavior?
    It would be great if the webpack watcher could stop at the same time as the electron app.

  • What is the motivation / use case for changing the behavior?
    Make life of the dev easier ;)

  • Please tell us about your environment:
    angular-electron-dream-starter's master on Ubuntu 14.04

The dist/package.json file is missing

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [x] question about the decisions made in the repository

  • What is the current behavior?
    The packager is complaining that the dist/package.json is missing. What is meant to be in this file and shouldn't it be including in the repo?

  • What is the expected behavior?
    The app is packaged

  • What is the motivation / use case for changing the behavior?
    To have the package built

  • Please tell us about your environment:

  • Angular version: 4.4.4
  • Browser: [Electron 1.7.9 Mac OS X 10.11.6 ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

> [email protected] package:mac /projects/angular-electron-dream-starter
> rimraf packages/mac/* && build --macos --x64

electron-builder 19.36.0
Error: Cannot find package.json in the /projects/angular-electron-dream-starter/dist
    at /projects/angular-electron-dream-starter/node_modules/electron-builder/src/packager.ts:207:11

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.