Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Error while building the project #363

Open
anaymalpani opened this issue May 30, 2020 · 19 comments
Open

Error while building the project #363

anaymalpani opened this issue May 30, 2020 · 19 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed in progress

Comments

@anaymalpani
Copy link

✓ 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/components@1.8.1 build: `tsdx build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @hospitalrun/components@1.8.1 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
@jackcmeyer
Copy link
Member

@anaymalpani could you please provide steps to reproduce?

@matteovivona matteovivona changed the title ERROR WHILE BUILDING THE PROJECT Error while building the project May 30, 2020
@matteovivona
Copy link
Collaborator

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

@anyapawar
Copy link

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

@anyapawar
Copy link

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

I completed the steps:

git clone
git@github.com:HospitalRun/hospitalrun.git
cd hospitalrun
git submodule update --init --recursive
yarn
yarn workspaces run build
(And received this error during run build)

@matteovivona matteovivona transferred this issue from HospitalRun/cli Jun 11, 2020
@matteovivona matteovivona added bug Something isn't working help wanted Extra attention is needed in progress labels Jun 11, 2020
@matteovivona
Copy link
Collaborator

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.

@reidmeyer
Copy link

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

@fox1t
Copy link
Member

fox1t commented Jun 11, 2020

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.

@reidmeyer
Copy link

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.

@jackcmeyer
Copy link
Member

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

@fox1t
Copy link
Member

fox1t commented Jun 16, 2020

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?

@reidmeyer
Copy link

reidmeyer commented Jun 16, 2020

@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

@fox1t
Copy link
Member

fox1t commented Jun 16, 2020

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

@reidmeyer
Copy link

reidmeyer commented Jun 16, 2020

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

@mraqkhan
Copy link

mraqkhan commented Jul 3, 2020

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

@matteovivona
Copy link
Collaborator

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

@Razi321
Copy link

Razi321 commented Oct 1, 2020

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

@matteovivona
Copy link
Collaborator

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

@Razi321
Copy link

Razi321 commented Oct 1, 2020

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

@matteovivona
Copy link
Collaborator

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed in progress
Projects
None yet
Development

No branches or pull requests

8 participants