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

Storefront BUILD FAILS lint checks with "Type error" medusa-starter-default #4079

Closed
gamesguru opened this issue May 11, 2023 · 2 comments
Closed

Comments

@gamesguru
Copy link

gamesguru commented May 11, 2023

Bug report

Describe the bug

When building the storefront with npm run build or next build I get the following error,

$ cd storefront

$ npm run build

> medusa-next@1.0.3 build
> next build

next.config.js {
  "reactStrictMode": true,
  "images": {
    "domains": [
      "medusa-public-images.s3.eu-west-1.amazonaws.com",
      "localhost"
    ]
  },
  "env": {}
}
info  - Linting and checking validity of types ...Failed to compile.

./src/lib/data/index.ts:20:3
Type error: Type 'PricedProduct[] | never[]' is not assignable to type 'Product[]'.
  Type 'PricedProduct[]' is not assignable to type 'Product[]'.
    Property 'beforeInsert' is missing in type 'PricedProduct' but required in type 'Product'.

  18 |     .catch((_) => [])
  19 | 
> 20 |   return products
     |   ^
  21 | }
  22 | 
  23 | // get global data used in header and footer

System information

Medusa version (including plugins): 1.3.7
Node.js version: 18
Database:
Operating system: Ubuntu 22.04
Browser (if relevant):

Steps to reproduce the behavior

  1. Create a new app according to https://docs.medusajs.com/create-medusa-app (with default options)
  2. Try to build the storefront
  3. Observe the lint failures
@chemicalkosek
Copy link
Contributor

#4060

@olivermrbl
Copy link
Contributor

Duplicate of #4060

@olivermrbl olivermrbl marked this as a duplicate of #4060 May 16, 2023
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