hospitalrun icon indicating copy to clipboard operation
hospitalrun copied to clipboard

Error while building the project

Open anaymalpani opened this issue 4 years ago • 19 comments

✓ Creating entry file 8.6 secs
(typescript) Error: D:/anaym/projects/node/f/hospitalrun/packages/components/src/components/Layout/Container.tsx(33,25): semantic error TS2769: No overload matches this call.
  Overload 1 of 2, '(props: Readonly<ReplaceProps<"symbol", BsPrefixProps<"symbol"> & ContainerProps>>): Container<"symbol">', gave the following error.
    Type '"symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | ... 158 more ... | undefined' is not assignable to type '"symbol" | undefined'.
      Type '"object"' is not assignable to type '"symbol" | undefined'.
  Overload 2 of 2, '(props: ReplaceProps<"symbol", BsPrefixProps<"symbol"> & ContainerProps>, context?: any): Container<"symbol">', gave the following error.
    Type '"symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | ... 158 more ... | undefined' is not assignable to type '"symbol" | undefined'.
      Type '"object"' is not assignable to type '"symbol" | undefined'.
Error: D:/anaym/projects/node/f/hospitalrun/packages/components/src/components/Layout/Container.tsx(33,25): semantic error TS2769: No overload matches this call.
  Overload 1 of 2, '(props: Readonly<ReplaceProps<"symbol", BsPrefixProps<"symbol"> & ContainerProps>>): Container<"symbol">', gave the following error.
    Type '"symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | ... 158 more ... | undefined' is not assignable to type '"symbol" | undefined'.
      Type '"object"' is not assignable to type '"symbol" | undefined'.
  Overload 2 of 2, '(props: ReplaceProps<"symbol", BsPrefixProps<"symbol"> & ContainerProps>, context?: any): Container<"symbol">', gave the following error.
    Type '"symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | ... 158 more ... | undefined' is not assignable to type '"symbol" | undefined'.
      Type '"object"' is not assignable to type '"symbol" | undefined'.
    at error (D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\rollup\dist\shared\node-entry.js:5400:30)
    at throwPluginError (D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\rollup\dist\shared\node-entry.js:11878:12)
    at Object.error (D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\rollup\dist\shared\node-entry.js:12912:24)
    at Object.error (D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\rollup\dist\shared\node-entry.js:12081:38)
    at RollupContext.error (D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\tsdx\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:17194:30)
    at D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\tsdx\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:24994:23
    at arrayEach (D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\tsdx\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:534:11)
    at forEach (D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\tsdx\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:9360:14)
    at printDiagnostics (D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\tsdx\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:24967:5)
    at Object.transform (D:\anaym\projects\node\f\hospitalrun\packages\components\node_modules\tsdx\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:29049:17)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @hospitalrun/[email protected] build: `tsdx build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @hospitalrun/[email protected] build 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\anaym\AppData\Roaming\npm-cache\_logs\2020-05-30T16_06_01_227Z-debug.log

Your Environment

  • node version: 12
  • os: Windows

anaymalpani avatar May 30 '20 16:05 anaymalpani

@anaymalpani could you please provide steps to reproduce?

jackcmeyer avatar May 30 '20 16:05 jackcmeyer

@anaymalpani do you use Windows or have you built with yarn?

matteovivona avatar May 30 '20 20:05 matteovivona

I am facing the same issue- how did you fix this problem?

anyapawar avatar Jun 11 '20 15:06 anyapawar

I have node v14.4.0, MacOS, yarn v1.19.1:

I completed the steps:

git clone [email protected]:HospitalRun/hospitalrun.git cd hospitalrun git submodule update --init --recursive yarn yarn workspaces run build (And received this error during run build)

anyapawar avatar Jun 11 '20 15:06 anyapawar

This is a yarn workspace issue when using a monorepo. It's an issue of low priority because all separate submodules build correctly. The team is informed of this issue but needs time to solve it. Any contributions are welcome.

matteovivona avatar Jun 11 '20 17:06 matteovivona

Could you clarify how to build all of the submodules to get the application to run? @tehKapa

reidmeyer avatar Jun 11 '20 18:06 reidmeyer

Hi! I am going to to look into this ASAP and hopefully fix the problem definitely! @reidmeyer you are right: we miss the documentation that explains how to use all the modules without mono repo. Let’s try to understand what are the main steps that are needed to use all modules in a stand alone way.

fox1t avatar Jun 11 '20 18:06 fox1t

Glad to hear @fox1t.

My guess would be to run "yarn run build" inside each package itself, but I think that is the same thing as running yarn workspaces run build. When I do this, I get errors with components and frontend.

That documentation would be super helpful.

reidmeyer avatar Jun 11 '20 19:06 reidmeyer

@reidmeyer for documentation on how to contribute to the individual modules: https://github.com/HospitalRun/hospitalrun/blob/master/.github/CONTRIBUTING.md

jackcmeyer avatar Jun 12 '20 04:06 jackcmeyer

Hi! I've looked into this. The real problem is TypeScript version > 3.9.x that changed how union types work. Our dependency is listed like "typescript": "~3.8.2" so it wouldn't be updated to a newer minor that brakes. Do you have TS globally installed?

fox1t avatar Jun 16 '20 13:06 fox1t

@fox1t I don't think I have it installed globally, as tsc isn't recognized. Although it could have been installed by visual studio. I do have a C:\Program Files (x86)\Microsoft SDKs\TypeScript\versions\03.08.03.00, but you say it only breaks at 3.9.x. This is using yarn so it might be the monorepo bugs still. image

reidmeyer avatar Jun 16 '20 14:06 reidmeyer

Could be a hoisting problem! Ok, lets see if my last commits fixes it! Thanks again.

fox1t avatar Jun 16 '20 16:06 fox1t

Just updating you: with the current commits, I'm getting the same errors as before.

I see you're working on it though, and I didn't run the MOST recent commit, so I will test again later!

NPM14 throws me errors on "yarn" command:

image

image

image

NPM12 gets passed the yarn command, but then on workspaces build it similarly fails with the overload:

image

reidmeyer avatar Jun 16 '20 16:06 reidmeyer

I am facing the same issue. Did someone get it working? How to fix this?

mraqkhan avatar Jul 03 '20 06:07 mraqkhan

We are looking into a new solution for the management of the monorepo... we don't have an ETA

matteovivona avatar Jul 03 '20 07:07 matteovivona

i'm still getting this error , anyone solved it ?

Razi321 avatar Oct 01 '20 13:10 Razi321

Unfortunately, yes. It is not easy to find a tool for the management of this complicated software

matteovivona avatar Oct 01 '20 14:10 matteovivona

so how can I R run this project on my local machine ? i've tried what's available but nothing works

Razi321 avatar Oct 01 '20 14:10 Razi321

You have to run hospitalrun-server and hospitalrun-frontend separately

matteovivona avatar Oct 01 '20 17:10 matteovivona