Error setting up redux toolkit for local development - redux

I've been trying to get the redux toolkit setup for local development and have been running into issues. I'm trying to setup the toolkit project under the packages/toolkit directory. When I try to run yarn install nothing is installed in the node_modules folder and below is the output from the terminal:
➤ YN0000: ┌ Project validation
➤ YN0057: │ #examples-query-react/graphql-codegen: Resolutions field will be ignored
➤ YN0000: └ Completed
➤ YN0000: ┌ Resolution step
➤ YN0002: │ #chakra-ui/accordion#npm:1.0.0 [1a614] doesn't provide framer-motion (pf3894), requested by #chakra-ui/transition
➤ YN0002: │ #chakra-ui/hooks#npm:1.0.0 [1a614] doesn't provide react-dom (p7fdf8), requested by #reach/auto-id
➤ YN0002: │ #chakra-ui/modal#npm:1.0.0 [1a614] doesn't provide react-dom (p700d9), requested by #chakra-ui/portal
➤ YN0002: │ #chakra-ui/popover#npm:1.0.0 [1a614] doesn't provide react-dom (p50155), requested by #chakra-ui/portal
➤ YN0002: │ #chakra-ui/react#npm:1.0.0 [4f028] doesn't provide react-dom (p0de17), requested by #chakra-ui/portal
➤ YN0002: │ #chakra-ui/react#npm:1.0.0 [4f028] doesn't provide react-dom (p55a3d), requested by #chakra-ui/toast
➤ YN0002: │ #chakra-ui/skeleton#npm:1.0.0 [1a614] doesn't provide #chakra-ui/theme (p91f15), requested by #chakra-ui/media-query
➤ YN0002: │ #chakra-ui/skeleton#npm:1.0.0 [1a614] doesn't provide #emotion/react (p906ad), requested by #chakra-ui/system
➤ YN0002: │ #chakra-ui/skeleton#npm:1.0.0 [1a614] doesn't provide #emotion/styled (p9ee07), requested by #chakra-ui/system
➤ YN0002: │ #chakra-ui/switch#npm:1.0.0 [1a614] doesn't provide framer-motion (p69422), requested by #chakra-ui/checkbox
➤ YN0002: │ #chakra-ui/theme-tools#npm:1.0.0 [3e9d3] doesn't provide react (p542db), requested by #chakra-ui/utils
➤ YN0002: │ #chakra-ui/tooltip#npm:1.0.0 [1a614] doesn't provide react-dom (pdc6b1), requested by #chakra-ui/portal
➤ YN0002: │ #endemolshinegroup/cosmiconfig-typescript-loader#npm:3.0.2 [5deea] doesn't provide typescript (p88564), requested by ts-node
➤ YN0002: │ #examples-action-listener/counter#workspace:examples/action-listener/counter doesn't provide jest (p780f7), requested by jest-watch-typeahead
➤ YN0060: │ #examples-query-react/authentication-with-extrareducers#workspace:examples/query/react/authentication-with-extrareducers provides #types/react (pde12b) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/authentication-with-extrareducers#workspace:examples/query/react/authentication-with-extrareducers provides react (pe1a51) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/authentication#workspace:examples/query/react/authentication provides #types/react (p89bd6) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/authentication#workspace:examples/query/react/authentication provides react (p2b7f5) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0002: │ #examples-query-react/graphql-codegen#workspace:examples/query/react/graphql-codegen doesn't provide #types/node (p4d56f), requested by ts-node
➤ YN0060: │ #examples-query-react/graphql-codegen#workspace:examples/query/react/graphql-codegen provides #types/react (p2c07d) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0002: │ #examples-query-react/graphql-codegen#workspace:examples/query/react/graphql-codegen doesn't provide graphql-tag (p714b3), requested by #graphql-codegen/typescript-rtk-query
➤ YN0060: │ #examples-query-react/graphql-codegen#workspace:examples/query/react/graphql-codegen provides react (pde925) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/graphql#workspace:examples/query/react/graphql provides #types/react (p0bb41) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/graphql#workspace:examples/query/react/graphql provides react (p7b674) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/mutations#workspace:examples/query/react/mutations provides #types/react (pf429f) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/mutations#workspace:examples/query/react/mutations provides react (p026b2) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/optimistic-update#workspace:examples/query/react/optimistic-update provides #types/react (pefd01) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/optimistic-update#workspace:examples/query/react/optimistic-update provides react (pa7deb) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/pagination#workspace:examples/query/react/pagination provides #types/react (pb2ca8) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/pagination#workspace:examples/query/react/pagination provides react (p46fd4) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/prefetching-automatic-waterfall#workspace:examples/query/react/prefetching-automatic-waterfall provides #types/react (p4cb2c) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/prefetching-automatic-waterfall#workspace:examples/query/react/prefetching-automatic-waterfall provides react (p13991) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/prefetching-automatic#workspace:examples/query/react/prefetching-automatic provides #types/react (p4d582) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/prefetching-automatic#workspace:examples/query/react/prefetching-automatic provides react (p09f45) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/prefetching#workspace:examples/query/react/prefetching provides #types/react (p6dc77) with version 18.0.12, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0060: │ #examples-query-react/prefetching#workspace:examples/query/react/prefetching provides react (p16f06) with version 18.1.0, which doesn't satisfy what #chakra-ui/react and some of its descendants request
➤ YN0002: │ #reduxjs/toolkit#workspace:packages/toolkit doesn't provide #testing-library/dom (p0743d), requested by #testing-library/user-event
➤ YN0060: │ #reduxjs/toolkit#workspace:packages/toolkit provides eslint (p62c44) with version 7.28.0, which doesn't satisfy what eslint-config-react-app and some of its descendants request
➤ YN0002: │ #reduxjs/toolkit#workspace:packages/toolkit doesn't provide react-dom (pbde47), requested by #testing-library/react
➤ YN0002: │ #reduxjs/toolkit#workspace:packages/toolkit [a9ce6] doesn't provide #testing-library/dom (p577e8), requested by #testing-library/user-event
➤ YN0060: │ #reduxjs/toolkit#workspace:packages/toolkit [a9ce6] provides eslint (p6195a) with version 7.28.0, which doesn't satisfy what eslint-config-react-app and some of its descendants request
➤ YN0002: │ #reduxjs/toolkit#workspace:packages/toolkit [a9ce6] doesn't provide react-dom (p3669a), requested by #testing-library/react
➤ YN0002: │ #reduxjs/toolkit#workspace:packages/toolkit [f93a7] doesn't provide #testing-library/dom (pff99c), requested by #testing-library/user-event
➤ YN0060: │ #reduxjs/toolkit#workspace:packages/toolkit [f93a7] provides eslint (pa91f4) with version 7.28.0, which doesn't satisfy what eslint-config-react-app and some of its descendants request
➤ YN0002: │ #reduxjs/toolkit#workspace:packages/toolkit [f93a7] doesn't provide react-dom (p63f33), requested by #testing-library/react
➤ YN0060: │ #rtk-query/codegen-openapi#workspace:packages/rtk-query-codegen-openapi provides babel-jest (p51bdb) with version 26.6.3, which doesn't satisfy what ts-jest requests
➤ YN0002: │ #rtk-query/oazapfts-patched#npm:3.6.0-2 doesn't provide openapi-types (p08ecc), requested by #apidevtools/swagger-parser
➤ YN0002: │ docs#workspace:docs doesn't provide graphql (p08aca), requested by graphql-request
➤ YN0002: │ docs#workspace:docs doesn't provide next (p53ee4), requested by next-redux-wrapper
➤ YN0002: │ docs#workspace:docs doesn't provide react (p00b31), requested by formik
➤ YN0002: │ docs#workspace:docs doesn't provide react (pfc6f5), requested by next-redux-wrapper
➤ YN0002: │ docs#workspace:docs doesn't provide react-redux (pf67eb), requested by next-redux-wrapper
➤ YN0002: │ docs#workspace:docs doesn't provide redux (p272bc), requested by #manaflair/redux-batch
➤ YN0002: │ docs#workspace:docs doesn't provide redux (p16155), requested by redux-persist
➤ YN0002: │ eslint-config-react-app#npm:7.0.1 [5a722] doesn't provide #babel/plugin-syntax-flow (pa22cf), requested by eslint-plugin-flowtype
➤ YN0002: │ eslint-config-react-app#npm:7.0.1 [5a722] doesn't provide #babel/plugin-transform-react-jsx (p1bbf5), requested by eslint-plugin-flowtype
➤ YN0002: │ eslint-config-react-app#npm:7.0.1 [74590] doesn't provide #babel/plugin-syntax-flow (p898ac), requested by eslint-plugin-flowtype
➤ YN0002: │ eslint-config-react-app#npm:7.0.1 [74590] doesn't provide #babel/plugin-transform-react-jsx (p7d3b0), requested by eslint-plugin-flowtype
➤ YN0002: │ react-dev-utils#npm:12.0.1 doesn't provide typescript (p59348), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ react-dev-utils#npm:12.0.1 doesn't provide webpack (p1012e), requested by fork-ts-checker-webpack-plugin
➤ YN0060: │ rtk-monorepo#workspace:. provides eslint (p88204) with version 7.28.0, which doesn't satisfy what eslint-config-react-app and some of its descendants request
➤ YN0060: │ website#workspace:website provides react (p3b914) with version 18.1.0, which doesn't satisfy what #docusaurus/core and some of its descendants request
➤ YN0060: │ website#workspace:website provides react (pe296a) with version 18.1.0, which doesn't satisfy what #docusaurus/preset-classic and some of its descendants request
➤ YN0060: │ website#workspace:website provides react-dom (p17183) with version 18.1.0, which doesn't satisfy what #docusaurus/core and some of its descendants request
➤ YN0060: │ website#workspace:website provides react-dom (p6da37) with version 18.1.0, which doesn't satisfy what #docusaurus/preset-classic and some of its descendants request
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 497ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 762ms
➤ YN0000: ┌ Link step
➤ YN0076: │ esbuild-android-arm64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-darwin-arm64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-freebsd-64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-freebsd-arm64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-linux-32#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-linux-64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-linux-arm64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-linux-arm#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-linux-mips64le#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-linux-ppc64le#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-netbsd-64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-openbsd-64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-sunos-64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-windows-32#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-windows-64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0076: │ esbuild-windows-arm64#npm:0.13.12 The darwin-x64 architecture is incompatible with this module, link skipped.
➤ YN0000: └ Completed in 1s 382ms
➤ YN0000: Done with warnings in 2s 817ms
I found an article that is talking about a similar issue here. I'm not sure if this is an actual issue with the dependencies in the library or something I'm doing wrong. Can someone send me setup instructions for the redux toolkit project?

Related

How and when to strip the url to serve a static site?

I have the following directory structure for my static web site:
│ infinote.exe
└───spa
│ favicon.ico
│ index.html
│
├───css
│ app.f99f51d4.css
│ vendor.d9e2261d.css
│
├───fonts
│ flUhRq6tzZclQEJ-Vdg-IuiaDsNa.40fa1be9.woff
│ flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.cf9862e8.woff2
│ KFOkCnqEu92Fr1MmgVxIIzQ.9391e6e2.woff
│ KFOlCnqEu92Fr1MmEU9fBBc-.ddd11dab.woff
│ KFOlCnqEu92Fr1MmSU5fBBc-.877b9231.woff
│ KFOlCnqEu92Fr1MmWUlfBBc-.0344cc3c.woff
│ KFOlCnqEu92Fr1MmYUtfBBc-.b555d228.woff
│ KFOmCnqEu92Fr1Mu4mxM.9b78ea3b.woff
│ PatuaOne-Regular.ttf
│ Poppins-Regular.ttf
│
├───icons
│ apple-icon-120x120.png
│ apple-launch-828x1792.png
│ favicon-128x128.png
│ favicon-16x16.png
│ favicon-32x32.png
│ favicon-96x96.png
│ icon-128x128.png
│ safari-pinned-tab.svg
│
└───js
app.3a5b0240.js
vendor.a9a3886c.js
infinote.exe is a binary compiled from Go and the line where I define how to serve the web site is
r.Handle("/spa/", http.StripPrefix("/spa/", http.FileServer(http.Dir("./spa"))))
I use chi as the router, and r := chi.NewRouter().
I expect http://example.com/spa/ to:
first request http://example.com/spa/ → this is ./spa/index.html
and then after parsing index.html, to request other files in ./spa
An example would be http://example.com/spa/js/vendor.a9a3886c.js → ./spa/js/vendor.a9a3886c.js
What happens is that index.html is retrieved correctly, and then all the referenced files return a 404 Not Found.
To be frank I do not exactly understand the mechanics (and need) of http.StripPrefix. Is this because the files in spa are relative to the full URL, in other words to ./spa/spa/...- which is not correct (and thus the need to strip app first)?
If so, why is only index.html retrieved correctly? Even favicon.ico is a 404 despite being in the same directory as index.html.
All credit goes to #mkopriva and #Zombo whose comments were, for some reason, deleted
After several iterations and tests, I managed to find a working version:
r.Handle("/spa/*",http.StripPrefix("/spa/", ttp.FileServer(http.Dir("spa"))))
The key part was the * in the first "pattern". I did not find anything about wildcards in the documentation but with a * it works - and without it does not (I get the 404`).
I would be delighted to have an answer that is better than that

Flutter HTTP Plugin

This error occurred when I tried to combine an SQL database cloud with Flutter. What might the problem be? I have already installed the HTTP plugin.
Running "flutter pub get" in fl_3441...
Error on line 21, column 5 of pubspec.yaml: A dependency may only have one source.
╷
21 │ ┌ sdk: flutter
22 │ │ http: ^0.12.0
23 │ │
24 │ │ # The following adds the Cupertino Icons font to your application.
25 │ │ # Use with the CupertinoIcons class for iOS style icons.
26 │ │ cupertino_icons: ^0.1.2
│ └──^
╵
---- Log transcript ----
FINE: Pub 2.8.1
MSG : Resolving dependencies...
SLVR: fact: hello_world is 1.0.0+1
SLVR: derived: hello_world
SLVR: Version solving took 0:00:00.055054 seconds.
| Tried 1 solutions.
FINE: Resolving dependencies finished (0.1s).
ERR : Error on line 21, column 5 of pubspec.yaml: A dependency may only have one source.
| ╷
| 21 │ ┌ sdk: flutter
| 22 │ │ http: ^0.12.0
| 23 │ │
| 24 │ │ # The following adds the Cupertino Icons font to your application.
| 25 │ │ # Use with the CupertinoIcons class for iOS style icons.
| 26 │ │ cupertino_icons: ^0.1.2
| │ └──^
| ╵
FINE: Exception type: PubspecException
FINE: package:pub/src/pubspec.dart 787:5 Pubspec._error
| package:pub/src/pubspec.dart 636:11 Pubspec._parseDependencies.<fn>
| dart:collection MapView.forEach
| package:pub/src/pubspec.dart 600:15 Pubspec._parseDependencies
| package:pub/src/pubspec.dart 164:9 Pubspec.dependencies
| package:pub/src/solver/package_lister.dart 211:35 PackageLister.incompatibilitiesFor
| ===== asynchronous gap ===========================
| dart:async Future.catchError
| package:pub/src/utils.dart 113:52 captureErrors.wrappedCallback
| package:stack_trace Chain.capture
| package:pub/src/utils.dart 126:11 captureErrors
| package:pub/src/command_runner.dart 191:13 PubCommandRunner.runCommand
---- End log transcript ----
pub get failed (65; ---- End log transcript ----)
You are not adding packages correctly. Spacing is very important in pubspec.yaml file.
Look at below, new added package must be in line of f of flutter.
dependencies:
flutter:
sdk: flutter
carousel_pro: ^0.0.13
http: ^0.12.0

Firebase function status failed

D:\work\ocr\receiptWeb\functions>functions list
┌────────┬────────┬─────────┬─────────────────────────────────────────────────────────────────┐
│ Status │ Name │ Trigger │ Resource │
├────────┼────────┼─────────┼─────────────────────────────────────────────────────────────────┤
│ FAILED │ upload │ HTTP │ http://localhost:8010/invoice-manager-251609/us-central1/upload │
├────────┼────────┼─────────┼─────────────────────────────────────────────────────────────────┤
│ FAILED │ tst │ HTTP │ http://localhost:8010/invoice-manager-251609/us-central1/tst │
├────────┼────────┼─────────┼─────────────────────────────────────────────────────────────────┤
│ FAILED │ tst1 │ HTTP │ http://localhost:8010/invoice-manager-251609/us-central1/tst1 │
└────────┴────────┴─────────┴─────────────────────────────────────────────────────────────────┘
D:\work\ocr\receiptWeb\functions>functions describe tst1
┌────────────┬───────────────────────────────────────────────────────────────────┐
│ Property │ Value │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Name │ tst1 │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Trigger │ HTTP │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Resource │ http://localhost:8010/invoice-manager-251609/us-central1/tst1 │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Timeout │ 60 seconds │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Local path │ D:\work\ocr\receiptWeb\functions │
├────────────┼───────────────────────────────────────────────────────────────────┤
│ Archive │ file://C:\Users\USER\AppData\Local\Temp\tmp-12096kv8vKcUEnCAt.zip │
└────────────┴───────────────────────────────────────────────────────────────────┘
When I go to the url I get
Function worker crashed with exit code: 1\nundefinedWarning, estimating Firebase Config based on GCLOUD_PROJECT. Initializing firebase-admin may fail[2019-10-06T12:57:02.376Z] #firebase/database: FIREBASE FATAL ERROR: Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com
I did
set FIREBASE_CONFIG={"projectId":"invoice-manager-251609","appId":"1:127001043239:web:e3c996dc4dab60b7c94902","databaseURL":"https://invoice-manager-251609.firebaseio.com","storageBucket":"invoice-manager-251609.appspot.com","locationId":"europe-west","apiKey":"AIzaSyCaV3vpQaEMUPjz9CftkYdp888l7cLy8Gw","authDomain":"invoice-manager-251609.firebaseapp.com","messagingSenderId":"127001043239"}
and the url is correct
How can I get more info on reason for the FAILED status?
When a Cloud Function encounters an error, it typically logs details. You can view the log files of the local emulator with $ functions logs read.

debugging firebase on local windows

I'm trying to debug firebase function on my local windows
as described in https://medium.com/#mwebler/debugging-firebase-functions-with-vs-code-3afab528bb36
I do
set FIREBASE_CONFIG={ databaseURL: 'https://invoice-manager-251609.firebaseio.com', storageBucket: 'invoice-manager-251609.appspot.com', projectId: 'invoice-manager-251609'}
functions start
and get
┌────────┬────────┬─────────┬─────────────────────────────────────────────────────────────────┐
│ Status │ Name │ Trigger │ Resource │
├────────┼────────┼─────────┼─────────────────────────────────────────────────────────────────┤
│ FAILED │ upload │ HTTP │ http://localhost:8010/invoice-manager-251609/us-central1/upload │
├────────┼────────┼─────────┼─────────────────────────────────────────────────────────────────┤
│ FAILED │ tst │ HTTP │ http://localhost:8010/invoice-manager-251609/us-central1/tst │
├────────┼────────┼─────────┼─────────────────────────────────────────────────────────────────┤
│ FAILED │ tst1 │ HTTP │ http://localhost:8010/invoice-manager-251609/us-central1/tst1 │
└────────┴────────┴─────────┴─────────────────────────────────────────────────────────────────┘
if I do
firebase emulators:start
I get
undefinedWarning, estimating Firebase Config based on GCLOUD_PROJECT.
Initializing firebase-admin may fail[2019-10-06T11:44:51.932Z]
#firebase/database: FIREBASE FATAL ERROR: Cannot parse Firebase url.
Please use https://.firebaseio.com
I also tried:
functions debug tst1
and get:
ERROR: Function worker crashed with exit code: 9
undefined(node:21096) [DEP0062] DeprecationWarning: `node --debug
and
node --debug-brkare invalid. Please usenode --inspectornode --inspect-brk` instead.
I tried with node-10 and node-8
I also tried this:
https://medium.com/#david_mccoy/build-and-debug-firebase-functions-in-vscode-73efb76166cf
and this
https://rominirani.com/google-cloud-functions-tutorial-debugging-local-functions-357c24829198
I get the same errors
whats going on?
how do I debugging firebase on local windows?
The guides in the question are correct, but
when running in Emulator, u have to set the db url manually
admin.initializeApp({
databaseURL: "https://<YOUR FIREBASE>.firebaseio.com"
});
here is the full cmd list:
functions start
functions deploy --trigger-http --timeout 600s funcName
functions inspect funcName
After that u can use chrome://inspect/ to connect to the process with the chrome debugger.
If you have issues, u can use:
functions logs read
NOTE: after functions start I still get the table with FAILED status - I ignore it

how to show all package dependency tree

Since 0.9.3 I'm having some problems with meteor package dependencies, for example some third party packages don't declare all of their dependencies (like underscore, which would normally be included but not when used by another package).
Is there a simple way to show the tree of dependencies, much like npm does?
meteor list
will show what's in your project
.meteor/versions will show all packages
but I'm trying to find out what is including (or not) other packages.
currently I'm getting errors like the following, but haven't included Minimongoid afaik and grepping finds no reference to it.
W20141001-19:19:46.137(-7)? (STDERR) /Users/dc/.meteor/packages/meteor-tool/.1.0.33.he3qxx++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
W20141001-19:19:46.137(-7)? (STDERR) throw(ex);
W20141001-19:19:46.138(-7)? (STDERR) ^
W20141001-19:19:46.141(-7)? (STDERR) ReferenceError: Minimongoid is not defined
W20141001-19:19:46.141(-7)? (STDERR) at collections/user.coffee:1:20
W20141001-19:19:46.141(-7)? (STDERR) at /Users/dc/dev/shumi/package-dev/app/.meteor/local/build/programs/server/app/collections/user.coffee.js:24:3
W20141001-19:19:46.142(-7)? (STDERR) at /Users/dc/dev/shumi/package-dev/app/.meteor/local/build/programs/server/boot.js:168:10
W20141001-19:19:46.142(-7)? (STDERR) at Array.forEach (native)
W20141001-19:19:46.142(-7)? (STDERR) at Function._.each._.forEach (/Users/dc/.meteor/packages/meteor-tool/.1.0.33.he3qxx++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
W20141001-19:19:46.142(-7)? (STDERR) at /Users/dc/dev/shumi/package-dev/app/.meteor/local/build/programs/server/boot.js:82:5
While we're waiting for the official tools to have this functionality, here's the uglyslow vershion:
for p in `meteor list | grep '^[a-z]' | awk '{ print $1"#"$2 }'`; do echo "$p"; meteor show "$p" | grep -E '^ [a-z]'; echo; done
This will show the dependencies of all added packages. It parses the output of meteor list and meteor show package#version and will break when anything there changes.
As of Meteor v1.5.2 (released 2017-09-05) you can now see the full dependency tree like this:
meteor list --tree
Here's what the output looks like:
$ meteor list --tree
accounts-password#1.4.0
├─┬ accounts-base#1.3.4
│ ├─┬ callback-hook#1.0.10
│ │ └── underscore#1.0.10
│ ├── check#1.2.5 (top level)
│ ├─┬ ddp#1.3.1
│ │ ├─┬ ddp-client#2.1.3
│ │ │ ├── callback-hook#1.0.10 (expanded above)
│ │ │ ├── check#1.2.5 (top level)
│ │ │ ├─┬ ddp-common#1.2.9
The pull request was contributed by sdarnel and can be found here for those interested:
https://github.com/meteor/meteor/pull/8936
Here's what I did...
I ran meteor list, and copied the output to notepad, to refer back to later.
Then, I went down the entire list, entering: meteor show <package> looking in the output for: Implies: whatever... that's the part that tells you what the particular package is including. Basically, the part of the output that says "Implies: something", those are the dependencies of the package you ran meteor show <package> for.
Then... if you take the packages in "Implies: foopackage", and run "meteor show foopackage" that will tell you that dependency's dependencies.
Basically, this is a crude solution to this problem which there is no official solution/feature/command for.
Good luck.
P.S. in my case, I wanted to see what was including iron:router, and through the above process, I determined it was useraccounts:semantic-ui that was including useraccounts:core, which in turn was including iron:router (which isn't in meteor list!)
See the following page for more info: https://github.com/meteor/meteor/issues/2853
I wrote some code here to build up a package tree, and make pictures like this:
It worked on the raw source code of the meteor distribution, so it'd need some tweaking to work on an actual app (and I cant help with that at the moment), but it'd be a start...

Resources