maciejtreder / ng-toolkit

:star: Angular tool-box! Start your PWA in two steps! Add Serverless support for existing projects and much more
https://www.angular-universal-pwa.maciejtreder.com
MIT License
1.12k stars 157 forks source link

Not working on an existing angular6 app #461

Open HadiAndroidApp opened 5 years ago

HadiAndroidApp commented 5 years ago

I'm submitting a...


[x ] Bug report  
[ ] Feature request
[ ] Documentation issue or request

In package


[ ] @ng-toolkit/init
[ x] @ng-toolkit/serverless
[ ] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug

Current behavior

I get an error in ng-toolkit/universal as it gives me error regarding bootstrap.

TypeError: Cannot read property 'properties' of undefined at module.exports (C:\Users\Admin\tableApp\node_modules\webpack-cli\bin\config-yargs.js:89:48) at C:\Users\Admin\tableApp\node_modules\webpack-cli\bin\webpack.js:60:27 at Object. (C:\Users\Admin\tableApp\node_modules\webpack-cli\bin\webpack.js:515:3) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18)

I also , am not able to deploy my angular 6 app on AWS. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! table-app@0.0.0 build:server:serverless: ng run tableApp:server:serverless && webpack --config webpack.server.config.js --progress --colors npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the table-app@0.0.0 build:server:serverless 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! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2018-10-03T15_47_02_156Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! table-app@0.0.0 build:serverless: npm run build:browser:serverless && npm run build:server:serverless npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the table-app@0.0.0 build:serverless 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! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2018-6Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! table-app@0.0.0 build:serverless:deploy: npm run build:serverless && npm run deploy npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the table-app@0.0.0 build:serverless:deploy 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! C:\Users\Admin\AppData\Roaming\npm-cache_logs\21Z-debug.log

Expected behavior

The app should be deployed on AWS.

Minimal reproduction of the problem with instructions

When i change directory to my built app, the npm run build:serverless:deploy gives errors as shown above

Example repository

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

Environment


Angular version: 6.1.9
Yes its still an issue

- Node version: XX  Angular 6.1.9
- Platform:  Windows 

Others:
 When a new app is created , it uploads to AWS fine .
When i 'cd myappname' and deploy another app it gives errors.

maciejtreder commented 5 years ago

Do you have your code hosted somewhere so I could reproduce this issue on my end?

HadiAndroidApp commented 5 years ago

Thank You , For the prompt reply.

Do you prefer that i should send you pictures/snaps(with the output) or the code. I don't really know how to send you code of my "command line". If you can guide me , how you want it , i will be able to send it to you within an hour.

Best regards

On Wed, Oct 3, 2018 at 12:20 PM Maciej Treder notifications@github.com wrote:

Assigned #461 https://github.com/maciejtreder/ng-toolkit/issues/461 to @HadiAndroidApp https://github.com/HadiAndroidApp.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/maciejtreder/ng-toolkit/issues/461#event-1882804268, or mute the thread https://github.com/notifications/unsubscribe-auth/ALrvLh0IxPkdcVqkoMP53E_Z6IRvEXa9ks5uhQ4SgaJpZM4XGX5U .

HadiAndroidApp commented 5 years ago

https://github.com/HadiAndroidApp/AWS-Hosting https://github.com/HadiAndroidApp/AWS

These are the links to the app .The commands that i am running in command prompt are

1)C:\Users\Admin>npm install -g serverless 2)C:\Users\Admin>serverless config credentials --provider aws --key AFDFGGFGF --secret AFSDFDF 3)C:\Users\Admin>cd tableApp 4)C:\Users\Admin\tableApp>ng add @ng-toolkit/universal 5)C:\Users\Admin\tableApp>ng add @ng-toolkit/serverless --provider aws 6)C:\Users\Admin\tableApp>npm run build:serverless:deploy

I get the error in the last step.

On Thu, Oct 4, 2018 at 1:21 AM Hadi Mehmood hadimahmood777@gmail.com wrote:

Thank You , For the prompt reply.

Do you prefer that i should send you pictures/snaps(with the output) or the code. I don't really know how to send you code of my "command line". If you can guide me , how you want it , i will be able to send it to you within an hour.

Best regards

On Wed, Oct 3, 2018 at 12:20 PM Maciej Treder notifications@github.com wrote:

Assigned #461 https://github.com/maciejtreder/ng-toolkit/issues/461 to @HadiAndroidApp https://github.com/HadiAndroidApp.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/maciejtreder/ng-toolkit/issues/461#event-1882804268, or mute the thread https://github.com/notifications/unsubscribe-auth/ALrvLh0IxPkdcVqkoMP53E_Z6IRvEXa9ks5uhQ4SgaJpZM4XGX5U .

titanum911 commented 5 years ago

in file "package.json", update webpack-cli: "webpack-cli": "^3.1.2", then run npm install then run npm run build:prod and it's going to work... Angular CLI: 6.2.4 Node: 8.12.0 npm: 6.4.1

HadiAndroidApp commented 5 years ago

Thank You for the reply. I did what you said. However i still cant take my Angular to AWS. Can you pleas give me the exact instructions that will enable me to do this .

Best Regards

On Thu, Oct 4, 2018 at 1:39 PM Tamer notifications@github.com wrote:

in file "package.json", update webpack-cli:

"webpack-cli": "^3.1.2", then run npm install then run npm run build:prod and it's going to work... Angular CLI: 6.2.4 Node: 8.12.0 npm: 6.4.1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maciejtreder/ng-toolkit/issues/461#issuecomment-427161442, or mute the thread https://github.com/notifications/unsubscribe-auth/ALrvLpycSaUO0dBeDAMRE9jlh-ORyGvgks5uhnIWgaJpZM4XGX5U .