codelab-friendlychat-web
codelab-friendlychat-web copied to clipboard
Step 6 is broken
Having issue with step 6. expected output is 5 chunks but all I'm getting is 4 `Time: 19011ms chunk {0} styles.b8bba95fab8adefc8f7b.bundle.css (styles) 84 bytes [initial] [rendered] chunk {1} polyfills.997d8cc03812de50ae67.bundle.js (polyfills) 84 bytes [initial] [rendered] chunk {2} main.ee32620ecd1edff94184.bundle.js (main) 84 bytes [initial] [rendered] chunk {3} inline.318b50c57b4eba3d437b.bundle.js (inline) 796 bytes [entry] [rendered]
ERROR in node_modules/@angular/fire/database/interfaces.d.ts(2,26): error TS2307: Cannot find module 'firebase/app'. node_modules/@angular/fire/firebase.app.module.d.ts(2,79): error TS2307: Cannot find module 'firebase/app'. node_modules/@angular/fire/auth/auth.d.ts(4,28): error TS2307: Cannot find module 'firebase/app'. src/app/app.component.ts(21,27): error TS2307: Cannot find module 'firebase'. `
also the firebase deploy --except functions
part isnt working either. its giving me a 404 error.
` i deploying database, storage, hosting i database: checking rules syntax... ✔ database: rules syntax for database friendlychat-60902 is valid i storage: checking storage.rules for compilation errors... ✔ storage: rules file storage.rules compiled successfully i storage: uploading rules storage.rules... (node:11543) UnhandledPromiseRejectionWarning: Error at new FirebaseError (/home/archangel/.npm-global/lib/node_modules/firebase-tools/lib/error.js:9:18) at Object.reject (/home/archangel/.npm-global/lib/node_modules/firebase-tools/lib/utils.js:78:27) at /home/archangel/.npm-global/lib/node_modules/firebase-tools/lib/deploy/hosting/prepare.js:48:26 at arrayEach (/home/archangel/.npm-global/lib/node_modules/firebase-tools/node_modules/lodash/lodash.js:516:11) at Function.forEach (/home/archangel/.npm-global/lib/node_modules/firebase-tools/node_modules/lodash/lodash.js:9344:14) at module.exports (/home/archangel/.npm-global/lib/node_modules/firebase-tools/lib/deploy/hosting/prepare.js:29:7) at _chain (/home/archangel/.npm-global/lib/node_modules/firebase-tools/lib/deploy/index.js:22:40) at /home/archangel/.npm-global/lib/node_modules/firebase-tools/lib/deploy/index.js:25:20 at process.internalTickCallback (internal/process/next_tick.js:77:7) (node:11543) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:11543) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. i hosting[friendlychat-60902]: beginning deploy... i hosting[friendlychat-60902]: found 0 files in dist ✔ hosting[friendlychat-60902]: file upload complete i database: releasing rules... ✔ database: rules for database friendlychat-60902 released successfully ✔ storage: released rules storage.rules to firebase.storage/friendlychat-60902.appspot.com i hosting[friendlychat-60902]: finalizing version...
Error: HTTP Error: 404, Not Found
versions: Node: v11.1.0 npm:6.4.1 ng:
Your global Angular CLI version (7.0.5) is greater than your local
version (1.7.4). The local Angular CLI version is used.
`
firebase:
6.1.0
@jmdobry PTAL
Update:
firebase deploy --only functions
seems to work just fine. as well as the non angular version. I think its the ng build that inst working because I dont see the prod folder in the directory
`=== Deploying to 'friendlychat-60902'...
i deploying functions i functions: ensuring necessary APIs are enabled... ✔ functions: all necessary APIs are enabled i functions: preparing functions directory for uploading... i functions: packaged functions (43.19 KB) for uploading ✔ functions: functions folder uploaded successfully i functions: updating Node.js 6 function addWelcomeMessages(us-central1)... ✔ functions[addWelcomeMessages(us-central1)]: Successful update operation.
✔ Deploy complete!
Project Console: https://console.firebase.google.com/project/friendlychat-60902/overview `
I had the same error today and fixed it by upgrading to Angular 6, @angular/fire 5.1.1, rxjs 6.4.0, and typescript 2.9.2.
Based on what @jeffie9 said, this package.json
enabled me to continue with the codelab
{ "name": "cloud-functions-angular-start", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build --prod", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "6.1.9", "@angular/cdk": "6.4.7", "@angular/common": "6.1.9", "@angular/compiler": "6.1.9", "@angular/core": "6.1.9", "@angular/forms": "6.1.9", "@angular/http": "6.1.9", "@angular/material": "6.4.7", "@angular/platform-browser": "6.1.9", "@angular/platform-browser-dynamic": "6.1.9", "@angular/router": "6.1.9", "angularfire2": "5.1.1", "core-js": "^2.4.1", "firebase": "^5.7.3", "rxjs": "5.6.0-forward-compat.5", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "~1.7.4", "@angular/compiler-cli": "6.1.10", "@angular/language-service": "6.1.10", "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "^4.0.1", "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~4.1.0", "tslint": "~5.9.1", "typescript": "2.9.2" } }
Francisco, are you sure your package.json file work, because when i tried your file it ask me for webpack dependency and after i put the webpack dependency in package.json file, It give me an error when i try to: ng build --prod:
Unable to find any apps in
.angular-cli.json
.
Here is my package.json, does anyone have a working package.json file :-?.
Here is my package.json file ( which doesn't work ). "dependencies": { "@angular/animations": "6.1.9", "@angular/cdk": "6.4.7", "@angular/common": "6.1.9", "@angular/compiler": "6.1.9", "@angular/core": "6.1.9", "@angular/forms": "6.1.9", "@angular/http": "6.1.9", "@angular/material": "6.4.7", "@angular/platform-browser": "6.1.9", "@angular/platform-browser-dynamic": "6.1.9", "@angular/router": "6.1.9", "angular": "^1.7.7", "angularfire2": "5.1.1", "core-js": "^2.4.1", "firebase": "^5.7.3", "rxjs": "6.0.0", "webpack": "3.0.0", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "~1.7.4", "@angular/compiler-cli": "6.1.10", "@angular/language-service": "6.1.10", "@types/jasmine": "~2.8.3", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "^4.0.1", "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", "karma": "~2.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~4.1.0", "tslint": "~5.9.1", "typescript": "2.9.2" }
@vuquocan1987 I tried again with my version of package.json and worked perfectly with npm install && ng build --prod
Perhaps you have a problem with the Angular version, did you try this? https://stackoverflow.com/questions/45207900/how-to-generate-angular-cli-json-file-in-angular-cli/