joaogarin / angular-electron

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

Cannot build #19

Closed FantasticFiasco closed 7 years ago

FantasticFiasco commented 7 years ago

I'm pretty new to the world of web development and desktop applications, but decided to get to know more about it. I find projects like this invaluable since they give me the boiler plate to start discovering this new technology.

My only problem is that I cannot build. Node: v7.2.1 npm: 4.0.3 Error:

> webpack --progress --profile

  0% compilingD:\Desktop\angular2-electron-master\node_modules\webpack-target-electron-renderer\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:37
                                        if(externals === dependency.request) {
                                                                   ^
TypeError: Cannot read property 'request' of undefined
    at handleExternals (D:\Desktop\angular2-electron-master\node_modules\webpack-target-electron-renderer\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:37:33)
    at next (D:\Desktop\angular2-electron-master\node_modules\webpack-target-electron-renderer\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:46:8)
...

Do you have any idea what the problem might be?

joaogarin commented 7 years ago

Hello Tks for pointing this out, seems like updating typescript to 2.1 was a bad idea!;P there are some issues https://github.com/angular/angular-cli/issues/1922 (this repo is not using the cli but the issue is simillar).

You can try it now, I just tested and seems to be working well.I moved typescript back to 2.0

FantasticFiasco commented 7 years ago

Thank you very much! It builds fine now on my machine, you've earned a star on the project.

Angular + Electron, here I come...

joaogarin commented 7 years ago

Great!!tks mate! Have fun =)

itsJess1ca commented 7 years ago

I've just run into this issue today on a fresh install. Typescript if at 2.0.10 Angular is at 2.4.0

Error =

node_modules\webpack-target-electron-renderer\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:37
                                        if(externals === dependency.request) {
                                                                   ^
TypeError: Cannot read property 'request' of undefined
agabidullin commented 7 years ago

Windows 10 Angular 2.4.2 Typescript: 2.0.0

After adding new package via "npm install --save @somepackage@" build crashed. And every run "npm run build" will return the same error

node_modules\webpack-target-electron-renderer\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:37 if(externals === dependency.request) { ^ TypeError: Cannot read property 'request' of undefined

After deleting "node_modules" folder and run "npm install" - build will work fine.

NicolasNeubauer commented 7 years ago

agabidullin: same here. Windows 10. removed all ^ from package.json, reinstalled node 6.9.4, cleared all caches, nothing works. Works on Mac OS X btw. same event, ran npm i for some random package, afterwards same "cannot read property request of undefined" appears.