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

On npm run build getting issues regarding typscript in my Strapi project #20329

Closed
KamranLatif98 opened this issue May 17, 2024 · 1 comment
Closed
Labels
flag: invalid template Automation Flag to handle invalid bug report templates

Comments

@KamranLatif98
Copy link

  • Node.js version: 20.10.0
  • NPM version: 10.6.0
  • Strapi version:3.6.11
  • Database: sqlite
  • Operating system: win32-x64
  • Is your project Javascript or Typescript: typescript

Describe the bug

A clear and concise description of what the bug is.

Steps to reproduce the behavior

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Following is my scripts and dependencies in package.json


  "scripts": {
    "develop": "strapi develop --debug",
    "start": "strapi start",
    "build": "strapi build",
    "strapi": "strapi",
  "production": "cross-env NODE_ENV=production npm run build"
  },
  "dependencies": {
    "@buffetjs/styles": "^3.3.8",
    "@strapi/admin": "^4.24.2",
    "@strapi/data-transfer": "^4.13.7",
    "@strapi/pack-up": "^4.17.1",
    "@strapi/plugin-cloud": "4.15.5",
    "@strapi/plugin-content-type-builder": "^4.15.0",
    "@strapi/plugin-i18n": "^4.15.0",
    "@strapi/plugin-upload": "^4.15.0",
    "@strapi/plugin-users-permissions": "^4.15.0",
    "@strapi/strapi": "^4.19.0",
    "@strapi/types": "^4.19.0",
    "better-sqlite3": "8.6.0",
    "cross-env": "^7.0.3",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-router-dom": "5.3.4",
    "strapi": "^3.6.11",
    "strapi-admin": "^3.6.11",
    "styled-components": "5.3.3",
    "typescript": "^5.4.5",
    "typescript-utils": "^1.0.0",
    "video-react": "^0.16.0"
  },

On npm run production i am getting this

PS C:\Users\kamra\OneDrive\Desktop\help-ndesks> npm run production

> help-ndesks@0.1.0 production
> cross-env NODE_ENV=production npm run build


> help-ndesks@0.1.0 build
> strapi build

✔ Compiling TS (4ms)
⠋ Building build context
C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\typescript-utils\node_modules\typescript\lib\typescript.js:17850
    return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex]));
                                                                  ^

Error: Debug Failure.
    at C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\typescript-utils\node_modules\typescript\lib\typescript.js:17850:67
    at String.replace (<anonymous>)
    at formatStringFromArgs (C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\typescript-utils\node_modules\typescript\lib\typescript.js:17850:17)
    at createCompilerDiagnostic (C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\typescript-utils\node_modules\typescript\lib\typescript.js:17951:14)
    at tryReadFile (C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\typescript-utils\node_modules\typescript\lib\typescript.js:36199:30)
    at Object.getParsedCommandLineOfConfigFile (C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\typescript-utils\node_modules\typescript\lib\typescript.js:36149:28)     
    at module.exports (C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\typescript-utils\lib\utils\resolve-config-options.js:9:43)
    at Object.run (C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\typescript-utils\lib\compilers\basic.js:21:55)
    at module.exports (C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\typescript-utils\lib\compile.js:9:19)
    at Object.build (C:\Users\kamra\OneDrive\Desktop\help-ndesks\node_modules\@strapi\admin\dist\_chunks\index-sNH2VWbC.js:655:24)

Node.js v20.10.0

All i want is to make its successful build to deploy on production server

@derrickmehaffy derrickmehaffy added the flag: invalid template Automation Flag to handle invalid bug report templates label May 31, 2024
Copy link
Contributor

This is a templated message

Hello @KamranLatif98,

We ask that you please follow the issue template.
A proper issue submission let's us better understand the origin of your bug and therefore help you. We will reopen your issue when we receive the issue following the template guidelines and properly fill out the template. You can see the template guidelines for bug reports here.

Please update the issue with the template and we can reopen this report.

Thank you.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: invalid template Automation Flag to handle invalid bug report templates
Projects
Status: Done
Development

No branches or pull requests

2 participants