joaogarin / angular-electron

Angular2 and Electron starter using webpack
149 stars 53 forks source link

Fresh install Build error #38

Closed ThomazPom closed 7 years ago

ThomazPom commented 7 years ago

Hi . I tried realy hard but i'm new in angular2/electron. I can't build . I get the following error at every try after a fresh clone, and a fresh install.

What i do :

npm install webpack -g
npm install electron -g
git clone https://github.com/joaogarin/angular2-electron
cd angular2-electron
npm install
npm run build

I tried on :

thank you for you help ! (s.f.m.b.e)

TypeError: Cannot read property 'request' of undefined
    at handleExternals (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack-target-electron-renderer/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:37:33)
    at next (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack-target-electron-renderer/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:46:8)
    at handleExternals (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack-target-electron-renderer/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:59:7)
    at ExternalModuleFactoryPlugin.<anonymous> (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack-target-electron-renderer/node_modules/webpack/lib/ExternalModuleFactoryPlugin.js:79:5)
    at /home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/NormalModuleFactory.js:207:3
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/node_modules/tapable/lib/Tapable.js:196:70)
    at NormalModuleFactory.create (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/NormalModuleFactory.js:191:8)
    at Compilation.process [as _addModuleChain] (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/Compilation.js:359:16)
    at Compilation.process [as addEntry] (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/Compilation.js:435:7)
    at SingleEntryPlugin.<anonymous> (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/SingleEntryPlugin.js:22:15)
    at Compiler.applyPluginsParallel (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/node_modules/tapable/lib/Tapable.js:229:14)
    at Compiler.<anonymous> (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/Compiler.js:463:8)
    at Compiler.applyPluginsAsyncSeries (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/node_modules/tapable/lib/Tapable.js:131:46)
    at Compiler.compile (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/Compiler.js:456:7)
    at Compiler.<anonymous> (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/Compiler.js:219:10)
    at Compiler.readRecords (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/Compiler.js:367:10)
    at Compiler.<anonymous> (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/Compiler.js:216:9)
    at next (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/node_modules/tapable/lib/Tapable.js:138:11)
    at Compiler.<anonymous> (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/CachePlugin.js:34:58)
    at Compiler.applyPluginsAsyncSeries (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/node_modules/tapable/lib/Tapable.js:142:13)
    at Compiler.<anonymous> (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/Compiler.js:213:8)
    at next (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/node_modules/tapable/lib/Tapable.js:138:11)
    at Compiler.<anonymous> (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/node/NodeEnvironmentPlugin.js:23:3)
    at Compiler.applyPluginsAsyncSeries (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/node_modules/tapable/lib/Tapable.js:142:13)
    at Compiler.run (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/lib/Compiler.js:210:7)
    at processOptions (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/bin/webpack.js:335:12)
    at Object.<anonymous> (/home/ThomazPom/Desktop/angular2-electron/node_modules/webpack/bin/webpack.js:339:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)

npm ERR! Linux 3.13.0-92-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build:dev"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! angular2-electron@0.0.0 build:dev: `webpack --progress --profile`
npm ERR! Exit status 1
joaogarin commented 7 years ago

Hello,

Can you take a look at this issue see if it rings a bell on something? https://github.com/joaogarin/angular2-electron/issues/19

Issue typically happened with mismatched versions of typescript and the awesome-typescript-loader. However they should be good now..I just did a test and worked on MAC OS at least.

FearAccepted commented 7 years ago

This is the build error. There is no config.json in the solution.

ERROR in ./src/app/services/authentication.ts Module not found: Error: Can't resolve './../config.json' in '/Users/xxxxxxxxx/Git/angular2-electron/src/app/services' @ ./src/app/services/authentication.ts 32:14-41 @ ./src/app/app.ts

joaogarin commented 7 years ago

Hello @jwsii7,

Take a look at the README file https://github.com/joaogarin/angular2-electron/blob/master/README.md

You need to add a config.json with the necessary credentials so that it sets authentication with github=P

Best regards

ThomazPom commented 7 years ago

@joaogarin I tried on some clean systems so.. i cant have an outdated version of typescript . I'll will try on a MacOS asap and give you a feedback ! :)

ThomazPom commented 7 years ago

@joaogarin It worked on the mac.

I tried again on windows. It worked. Black magic haha.

Thank you for your support 🥇

[at-loader] Checking started in a separate process...

[at-loader] Ok, 2.364 sec.
2449ms asset optimization
858ms emitting
Hash: 5c1e87297d08371cc569
Version: webpack 2.1.0-beta.25
Time: 56028ms
               Asset     Size  Chunks             Chunk Names
              app.js  2.79 MB       0  [emitted]  app
           vendor.js  1.56 MB       1  [emitted]  vendor
        polyfills.js   341 kB       2  [emitted]  polyfills
             app.map  2.87 MB       0  [emitted]  app
          vendor.map  1.66 MB       1  [emitted]  vendor
       polyfills.map   425 kB       2  [emitted]  polyfills
assets/app-icon.icns   231 kB          [emitted]
    + 858 hidden modules

WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
71:15 Critical dependency: the request of a dependency is an expression

WARNING in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
87:15 Critical dependency: the request of a dependency is an expression