Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] clean command failing when packages are freezed #9295

Closed
SalahAdDin opened this issue Sep 25, 2024 · 4 comments
Closed

[BUG] clean command failing when packages are freezed #9295

SalahAdDin opened this issue Sep 25, 2024 · 4 comments

Comments

@SalahAdDin
Copy link

SalahAdDin commented Sep 25, 2024

Bug report

Describe the bug

A clear and concise description of what the bug is.

System information

Medusa version (including plugins):

"@medusajs/admin": "^7.1.16",
    "@medusajs/cache-inmemory": "1.8.11",
    "@medusajs/cache-redis": "^1.9.2",
    "@medusajs/event-bus-local": "1.9.9",
    "@medusajs/event-bus-redis": "^1.8.14",
    "@medusajs/file-local": "1.0.4",
    "@medusajs/medusa": "^1.20.10",
    "@rsc-labs/medusa-documents": "^0.8.4",
    "@tanstack/react-query": "4.22.0",
    "body-parser": "^1.19.0",
    "cors": "^2.8.5",
    "dotenv": "16.3.1",
    "express": "^4.17.2",
    "medusa-fulfillment-manual": "1.1.41",
    "medusa-interfaces": "1.3.10",
    "medusa-payment-manual": "1.0.25",
    "medusa-payment-stripe": "6.0.11",
    "medusa-plugin-typesense": "^0.0.1",
    "prism-react-renderer": "^2.0.4",
    "typeorm": "0.3.16"

Node.js version: v20.15.1
Database: Postgre SQL 13
Operating system: Manjaro Linux
Browser (if relevant): Firefox

Steps to reproduce the behavior

  1. Setup the project with create-medusa-app: pnpm dlx create-medusa-app@latest
  2. Remove the packages and lock file: rm -rf node_modules yarn.lock
  3. Freeze the packages by removing ^ in package.json.
  4. Install packages again: yarn
  5. Run the developer mode: yarn dev.
  6. See the error.

Expected behavior

It should not give any error.

Screenshots

 yarn dev                                                        ✔  1m 4s  
yarn run v1.22.22
$ cross-env yarn run build:server && medusa develop
$ cross-env yarn run clean && tsc -p tsconfig.server.json
$ cross-env ./node_modules/.bin/rimraf dist
node_modules/@types/lodash/common/object.d.ts:1026:46 - error TS1005: '?' expected.

1026         : K extends `${infer N extends number}` ? T[N]
                                                  ~

node_modules/@types/lodash/common/object.d.ts:1031:46 - error TS1005: '?' expected.

1031         : K extends `${infer N extends number}` ? T[N]
                                                  ~

node_modules/@types/lodash/common/object.d.ts:1041:46 - error TS1005: '?' expected.

1041         : K extends `${infer N extends number}`
                                                  ~

node_modules/type-fest/source/camel-case.d.ts:25:32 - error TS1005: '?' expected.

25  infer FirstWord extends string,
                                  ~

node_modules/type-fest/source/camel-case.d.ts:26:42 - error TS1005: '?' expected.

26  ...infer RemainingWords extends string[],
                                            ~

node_modules/type-fest/source/join.d.ts:59:36 - error TS1005: '?' expected.

59    infer First extends JoinableItem,
                                      ~

node_modules/type-fest/source/join.d.ts:60:49 - error TS1005: '?' expected.

60    ...infer Tail extends readonly JoinableItem[],
                                                   ~

node_modules/type-fest/source/join.d.ts:64:50 - error TS1005: '?' expected.

64     ...infer Head extends readonly JoinableItem[],
                                                    ~

node_modules/type-fest/source/join.d.ts:65:36 - error TS1005: '?' expected.

65     infer Last extends JoinableItem,
                                      ~


Found 9 errors.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Code snippets

If applicable, add code samples to help explain your problem

Additional context

When putting the ^ back and removing the lock file, it works properly.

@SalahAdDin
Copy link
Author

Packages affecting at the moment:

 yarn why @types/lodash               INT ✘ 
yarn why v1.22.22
[1/4] Why do we have the module "@types/lodash"...?
[2/4] Initialising dependency graph...
warning Resolution field "[email protected]" is incompatible with requested version "glob@^8.0.3"
warning Resolution field "[email protected]" is incompatible with requested version "glob@^10.3.10"
warning Resolution field "[email protected]" is incompatible with requested version "glob@^8.0.3"
warning Resolution field "[email protected]" is incompatible with requested version "glob@^8.1.0"
warning Resolution field "[email protected]" is incompatible with requested version "glob@^7.2.0"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "@types/[email protected]"
info Reasons this module exists
   - "@medusajs#admin#@medusajs#admin-ui#react-json-tree" depends on it
   - Hoisted from "@medusajs#admin#@medusajs#admin-ui#react-json-tree#@types#lodash"
   - Hoisted from "@medusajs#admin#@medusajs#admin-ui#react-json-tree#react-base16-styling#@types#lodash"
info Disk size without dependencies: "3.59MB"
info Disk size with unique dependencies: "3.59MB"
info Disk size with transitive dependencies: "3.59MB"
info Number of shared dependencies: 0
Done in 0.33s.

And

 yarn why type-fest                       ✔ 
yarn why v1.22.22
[1/4] Why do we have the module "type-fest"...?
[2/4] Initialising dependency graph...
warning Resolution field "[email protected]" is incompatible with requested version "glob@^8.0.3"
warning Resolution field "[email protected]" is incompatible with requested version "glob@^10.3.10"
warning Resolution field "[email protected]" is incompatible with requested version "glob@^8.0.3"
warning Resolution field "[email protected]" is incompatible with requested version "glob@^8.1.0"
warning Resolution field "[email protected]" is incompatible with requested version "glob@^7.2.0"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "type-fest"
info Reasons this module exists
   - Hoisted from "@medusajs#admin#@medusajs#admin-ui#type-fest"
   - Hoisted from "@medusajs#event-bus-local#@medusajs#utils#@mikro-orm#migrations#umzug#type-fest"
info Disk size without dependencies: "568KB"
info Disk size with unique dependencies: "568KB"
info Disk size with transitive dependencies: "568KB"
info Number of shared dependencies: 0
=> Found "boxen#[email protected]"
info This module exists because "@medusajs#medusa#boxen" depends on it.
info Disk size without dependencies: "232KB"
info Disk size with unique dependencies: "232KB"
info Disk size with transitive dependencies: "232KB"
info Number of shared dependencies: 0
=> Found "eslint#[email protected]"
info Reasons this module exists
   - "eslint#globals" depends on it
   - Hoisted from "eslint#globals#type-fest"
info Disk size without dependencies: "112KB"
info Disk size with unique dependencies: "112KB"
info Disk size with transitive dependencies: "112KB"
info Number of shared dependencies: 0
=> Found "ansi-escapes#[email protected]"
info This module exists because "jest#@jest#core#ansi-escapes" depends on it.
info Disk size without dependencies: "256KB"
info Disk size with unique dependencies: "256KB"
info Disk size with transitive dependencies: "256KB"
info Number of shared dependencies: 0
Done in 0.30s.

Copy link
Contributor

github-actions bot commented Dec 8, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 3 days.

@github-actions github-actions bot added the Stale label Dec 8, 2024
@SalahAdDin
Copy link
Author

Is it still relevant since Medusa v1 won't be maintained anymore?

@github-actions github-actions bot removed the Stale label Dec 16, 2024
@sradevski
Copy link
Member

We won't be looking into this as v1 support is reserved for critical and security fixes, and this isn't one of them. Thanks for reporting though, and let us know if you face something similar with v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants