Git Product home page Git Product logo

fullstack-pro's People

Contributors

amitdah4 avatar amitnayan avatar beeena avatar cdmbase avatar dependabot[bot] avatar dhruvg1686 avatar guppuboss avatar haseebiqbal33 avatar hetalsharma5686 avatar hetalsharma5687 avatar huzaifaali14 avatar lyudad avatar muflahnasir avatar onjectiondevops avatar owaismahmooddar avatar tomasberg avatar veeramarni avatar yaramohammed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fullstack-pro's Issues

Getting warnings while run NPM install : requires a peer of hemera-joi@>6.x but none is installed. You must install peer dependencies yourself.

Getting 2 warning when run : npm install

Warning 1:
npm WARN @sample-stack/[email protected] requires a peer of hemera-joi@>6.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of mocha@>=2.4.5 <=5 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of nats@>= 0.8.x <= 1.2.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^15.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-redux@^4.0.0 || ^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of sinon@1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^1.9.11 || ^2 || ^3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@graphql-codegen/cli/node_modules/fsevents):

Warning 2:
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

persistgraphql-webpack-plugin not compatible with webpack 4

Disabling persistgraphql-webpack-plugin for now.

{ Error: Command failed: npm run prepublish
(node:84543) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
buffer.js:183
    throw new TypeError(kFromErrorMsg);
    ^

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at Function.Buffer.from (buffer.js:183:11)
    at writeOut (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack/lib/Compiler.js:279:25)
    at asyncLib.forEach (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack/lib/Compiler.js:293:13)
    at baseEach (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/neo-async/async.js:2416:9)
    at Object.each (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/neo-async/async.js:2843:9)
    at emitFiles (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/webpack/lib/Compiler.js:257:13)
    at /Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/fullstack-pro/node_modules/mkdirp/index.js:30:20
    at FSReqWrap.oncomplete (fs.js:135:15)

generate persistgraphql

Right now persistgraphql work on generating extracted_queries.json. Need to find ways to gather all the grahql and create extracted-queries.json which is accessible from frontend and backend.

docker run for integration test

We need to test and make sure all ports are mapped correctly for docker integration test.

1). Docker Run on hemera server
a) able to connect from the container to nats running on 4222 port on the host.

2). Docker run on backend server
a) able to connect from the container to nats running on 4222 port on the host.
b) map the container port 8080 to host port 8080 or something available. So we can access for other apps.

  1. Docker run on frontend server
    a) able to connect to 8080 exposed by the backend-server
    b) map the container port 3000 to host port 3000 so we can open the url in the browser.

TypeError: Cannot read property 'parentCompilation' of undefined

With spinjs": "0.4.159", we noticing following errors.

> [email protected] watch /Users/full-stack/servers/backend-server
> cross-env NODE_ENV=development ENV_FILE=../../config/development/dev.env spin watch

TypeError: Cannot read property 'parentCompilation' of undefined
    at Object.getRootCompiler (/Users/full-stack/node_modules/awesome-typescript-loader/src/instance.ts:71:15)
    at compiler (/Users/full-stack/node_modules/awesome-typescript-loader/src/index.ts:40:23)
    at Object.loader (/Users/full-stack/node_modules/awesome-typescript-loader/src/index.ts:14:12)
    at LOADER_EXECUTION (/Users/full-stack/node_modules/loader-runner/lib/LoaderRunner.js:119:14)
    at runSyncOrAsync (/Users/full-stack/node_modules/loader-runner/lib/LoaderRunner.js:120:4)
    at iterateNormalLoaders (/Users/full-stack/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
    at /Users/full-stack/node_modules/loader-runner/lib/LoaderRunner.js:202:4
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3) 'TypeError: Cannot read property \'parentCompilation\' ofundefined\n    at Object.getRootCompiler (/Users/full-stack/node_modules/awesome-typescript-loader/src/instance.ts:71:15)\n    at compiler (/Users/full-stack/node_modules/awesome-typescript-loader/src/index.ts:40:23)\n    at Object.loader (/Users/full-stack/node_modules/awesome-typescript-loader/src/index.ts:14:12)\n    at LOADER_EXECUTION (/Users/full-stack/node_modules/loader-runner/lib/LoaderRunner.js:119:14)\n    at runSyncOrAsync (/Users/full-stack/node_modules/loader-runner/lib/LoaderRunner.js:120:4)\n    at iterateNormalLoaders (/Users/full-stack/node_modules/loader-runner/lib/LoaderRunner.js:229:2)\n    at /Users/full-stack/node_modules/loader-runner/lib/LoaderRunner.js:202:4\n    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)'
server-webpack error Module build failed (from /Users/full-stack/node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
Cannot read property 'parentCompilation' of undefined

    at Object.getRootCompiler (/Users/full-stack/node_modules/awesome-typescript-loader/src/instance.ts:71:15)
    at compiler (/Users/full-stack/node_modules/awesome-typescript-loader/src/index.ts:40:23)
    at Object.loader (/Users/full-stack/node_modules/awesome-typescript-loader/src/index.ts:14:12)

token not fount error

Throw token not found error in better way

currently it throws like this

./token_revoke.sh eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkOWMyMmE2Mi1kNDk3LTQyMWQtYWJhOC0zOWRiYjMxOWQyMmEiLCJzdWIiOiI1OWQ4MDYzZDk0OWQ3NTcxNjI0YWE0MDQiLCJleHAiOjE1MDc5MTA3NTIsImlhdCI6MTUwNzkwNzE1Mn0.Z5rmbWgeumapgvP2Zglg6dKqJA6VBl-9KFxbSwE7SnY
{}Veeras-MacBook-Pro:curl veeramarni$ ./tokeinfo.sh eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkOWMyMmE2Mi1kNDk3LTQyMWQtYWJhOC0zOWRiYjMxOWQyMmEiLCJzdWIiOiI1OWQ4MDYzZDk0OWQ3NTcxNjI0YWE0MDQiLCJleHAiOjE1MDc5MTA3NTIsImlhdCI6MTUwNzkwNzE1Mn0.Z5rmbWgeumapgvP2Zglg6dKqJA6VBl-9KFxbSwE7SnY<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Error: Token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkOWMyMmE2Mi1kNDk3LTQyMWQtYWJhOC0zOWRiYjMxOWQyMmEiLCJzdWIiOiI1OWQ4MDYzZDk0OWQ3NTcxNjI0YWE0MDQiLCJleHAiOjE1MDc5MTA3NTIsImlhdCI6MTUwNzkwNzE1Mn0.Z5rmbWgeumapgvP2Zglg6dKqJA6VBl-9KFxbSwE7SnY not Found or not Valid<br> &nbsp; &nbsp;at ValidateTokenService.&lt;anonymous&gt; (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/IDE/identity-stack/servers/packages/identity-server-core/lib/index.js:3128:1)<br> &nbsp; &nbsp;at Generator.next (&lt;anonymous&gt;)<br> &nbsp; &nbsp;at fulfilled (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/IDE/identity-stack/servers/packages/identity-server-core/lib/index.js:2995:1)<br> &nbsp; &nbsp;at &lt;anonymous&gt;<br> &nbsp; &nbsp;at process._tickCallback (internal/process/next_tick.js:188:7)</pre>
</body>
</html>

SSR rendering mismatch

Rendering issue

index.cb8d6311f6c52c49f24e.js:9505 Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
 (client) a-reactid="14">{
  "isSaving": false,
  
 (server) a-reactid="14">{
  "counter": 85,
  "isS

source map for backend

Right now errors referred to index.js instead of specific file.

[02:48:20.922Z] ERROR fullstack-server: Cannot read property 'compareHash' of undefined
    TypeError: Cannot read property 'compareHash' of undefined
        at VersioningHasher.<anonymous> (/Users/veeramarni/Documents/eclipse/workspace/phoneapps/development/projects/IDE/identity-stack/servers/packages/identity-server-core/lib/index.js:290:1)
        at next (native)

create official examples of the packages we used in this project

Background

We want to create as many examples from all the packages we use in our stack… it is becoming difficult to troubleshoot which of the latest packages was causing an issue. So we want to write examples shown by that package in our project.

image

Here, you see connectedReactRouter’s counter example, to check whether it is working as expected we navigate through the menu and we should have the webpage redirect to that location. Then we can do counter test to make sure latest connected-react-router is working fine.
similarly, we will add more counter examples for other packages such as apollo/epics/redux/react-redux, etc.

Test-case failing with version @next

To replicate the issue just run npm run test from root folder.

  ● redux integration › updates child props on state change
    expect(received).toEqual(expected)
    Expected value to equal:
      {"people": [{"name": "Leia Skywalker"}]}
    Received:
      {"people": [{"name": "Leia Skywalker", Symbol(id): "$ROOT_QUERY.allPeople({\"first\":2}).people.0"}], Symbol(i
d): "$ROOT_QUERY.allPeople({\"first\":2})"}

    Difference:

    - Expected
    + Received

      Object {
        "people": Array [
          Object {
            "name": "Leia Skywalker",
    +       Symbol(id): "$ROOT_QUERY.allPeople({\"first\":2}).people.0",
          },
        ],
    +   Symbol(id): "$ROOT_QUERY.allPeople({\"first\":2})",
      }

      at Component.componentWillReceiveProps (packages/sample-client-react/src/containers/__tests__/redux.test.tsx:65:54)
      at node_modules/react-test-renderer/lib/ReactCompositeComponent.js:610:23
      at measureLifeCyclePerf (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:75:12)
      at ReactCompositeComponentWrapper.updateComponent (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:609:9)
      at ReactCompositeComponentWrapper.receiveComponent (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:546:10)
      at Object.receiveComponent (node_modules/react-test-renderer/lib/ReactReconciler.js:124:22)
      at ReactCompositeComponentWrapper._updateRenderedComponent (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:753:23)
      at ReactCompositeComponentWrapper._performComponentUpdate (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:723:10)
      at ReactCompositeComponentWrapper.updateComponent (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:644:12)
      at ReactCompositeComponentWrapper.receiveComponent (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:546:10)

npm install fails with ./staging due to corrupted package-lock.json

Error

$ npm install -f && npm run build
npm WARN using --force I sure hope you know what you are doing.
npm WARN The package @fullstack-pro/server-core is included as both a dev and production dependency.

npm ERR! path /Users/mycomputer/fullstack-pro/node_modules/.staging/frontend-server-f1e8c89e/node_modules/@workbench-stack/client-core
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/mycomputer/fullstack-pro/node_modules/.staging/frontend-server-f1e8c89e/node_modules/@workbench-stack/client-core' -> '/Users/mycomputer/fullstack-pro/node_modules/.staging/@package-stack/client-core-22f97ec8'
npm ERR! enoent This is related to npm not being able to find a file.

Resolution:

Remove package-lock.json

cors temporarily disabled

getting undefined cors origin when the frontend connects to backend in kubernetes env. Temporary disabled on both env.

automate publish

Add

        "prepublish": "git checkout publish && git merge -s recursive -X theirs master",
        "publish": "lerna publish",
        "postpublish": "git checkout master",
        "publish:force": "npm run publish -- --force-publish=*",

typscript @1.4 errors

Seeing some significant errors withs @typescript 1.4. We will continue with version 1.3 until we know exactly the issue is.

[at-loader] Checking finished with 6 errors
[at-loader] ./node_modules/graphql-subscriptions/dist/pubsub-engine.d.ts:5:52
    TS2304: Cannot find name 'AsyncIterator'.

[at-loader] ./node_modules/graphql-subscriptions/dist/pubsub.d.ts:12:52
    TS2304: Cannot find name 'AsyncIterator'.

[at-loader] ./node_modules/graphql-subscriptions/dist/with-filter.d.ts:2:94
    TS2304: Cannot find name 'AsyncIterator'.

[at-loader] ./node_modules/graphql-subscriptions/dist/with-filter.d.ts:3:58
    TS2304: Cannot find name 'AsyncIterator'.
[at-loader] ./node_modules/rxjs/Subject.d.ts:16:22
    TS2415: Class 'Subject<T>' incorrectly extends base class 'Observable<T>'.
  Types of property 'lift' are incompatible.
    Type '<R>(operator: Operator<T, R>) => Observable<T>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<R>'.
      Type 'Observable<T>' is not assignable to type 'Observable<R>'.
        Type 'T' is not assignable to type 'R'.

[at-loader] ./node_modules/rxjs/observable/dom/WebSocketSubject.d.ts:24:22
    TS2415: Class 'WebSocketSubject<T>' incorrectly extends base class 'AnonymousSubject<T>'.
  Types of property 'lift' are incompatible.
    Type '<R>(operator: Operator<T, R>) => WebSocketSubject<R>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<T>'.
      Type 'WebSocketSubject<R>' is not assignable to type 'Observable<T>'.
        Types of property 'operator' are incompatible.
          Type 'Operator<any, R>' is not assignable to type 'Operator<any, T>'.
            Type 'R' is not assignable to type 'T'.

[at-loader] ./servers/frontend-server/src/index.tsx:68:19
    TS2345: Argument of type '{ apollo: (state: Store, action: ApolloAction) => Store; "@sample/counter": (state: { value: numb...' is not assignable to parameter of type 'ReducersMapObject'.
  Property 'apollo' is incompatible with index signature.
    Type '(state: Store, action: ApolloAction) => Store' is not assignable to type 'Reducer<any>'.
      Types of parameters 'action' and 'action' are incompatible.
        Type 'A' is not assignable to type 'ApolloAction'.
          Type 'Action' is not assignable to type 'ApolloAction'.
            Type 'Action' is not assignable to type 'QueryResultAction'.
              Property 'result' is missing in type 'Action'.
                Type 'A' is not assignable to type 'WriteAction'.
                  Type 'Action' is not assignable to type 'WriteAction'.
                    Property 'writes' is missing in type **'Action'.**
 #```

graphql subscription fails with "invalid frame header"

VM15507:161 WebSocket connection to 'ws://localhost:8080/graphql' failed: Invalid frame header

This is due to webpack auto updates at some point broke the subscription. The workaround is to restart the server to temporarily fix the issue.

This issue happens mostly when you try to modify the subscription code of the graphql-schema.

TypeError: eventemitter3_1.EventEmitter is not a constructor

client.js:47 Uncaught TypeError: eventemitter3_1.EventEmitter is not a constructor
at new SubscriptionClient (client.js:47)
at Object../src/index.js (index.js:33)
at webpack_require (bootstrap b03e71f0b0db94868ce6:669)
at fn (bootstrap b03e71f0b0db94868ce6:87)
at Object.0 (splashscreen.js:10)
at webpack_require (bootstrap b03e71f0b0db94868ce6:669)
at bootstrap b03e71f0b0db94868ce6:715
at bundle.js:719

optimize webpack watch by running

Current Problem:

Right now, we run webpack --watch using lerna command which executes as parallel process to run on all the packages. This would takes more cpu and if we have more packages it will slow down the system.
https://github.com/cdmbase/fullstack-pro/blob/webpack-watch/package.json#L27

Proposed Solution:

Need to optimize webpack, by having multiple entry points pointing to each package and bundling within the package directory.

https://github.com/cdmbase/fullstack-pro/blob/webpack-watch/tools/webpack-helper.js#L40

That way we will have a root webpack config for all the packages and it also improves the performance for webpack -watch.

Also, we need to run multiple webpack compilations based on lerna's package folders. If we going many packages for a folder, we can limit it to have multiple folders inorder to have multiple webpack compilation.

graphql errors

Noticing some errors.

[16:13:06.790Z] ERROR @sample-stack-server: 2 errors were thrown when executing your GraphQL queries.
    Error: 2 errors were thrown when executing your GraphQL queries.
        at /Users/veeramarni/Documents/fullstack-pro/node_modules/react-apollo/server.js:86:19
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
[HPM] Error occurred while trying to proxy request / from localhost:3000 to http://localhost:3010 (ECONNRESET) (https://nodejs.org/api/errors.html#errors_common_system_errors)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.