You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

运行Figma拼写检查器扩展报错:npm run build正常但spellcheck失败

Troubleshooting Your Figma Spellchecker Extension Run Issue

Hey there, let's work through why your Figma spellchecker extension won't run even though npm run build completes successfully. Here are actionable steps to diagnose and fix the problem:

  • Verify the spellcheck script configuration in package.json
    First, pop open your package.json file and check the scripts section. Make sure the spellcheck command points to the correct script file with the right path. For example, if your spellcheck logic lives in scripts/spellcheck.js, the command should look like:

    "scripts": {
      "spellcheck": "node scripts/spellcheck.js"
    }
    

    Typos in the file path or command name are a super common culprit here.

  • Reinstall dependencies to rule out missing packages
    Sometimes npm run build works because it doesn't rely on the same dependencies as the spellcheck script. Run npm install to refresh all your project dependencies. If your spellcheck uses specific libraries (like cspell or a custom spellcheck module), double-check that they're listed in either dependencies or devDependencies in package.json.

  • Get detailed error logs to pinpoint the issue
    The vague "console error" message isn't enough to diagnose the problem. Run the command with verbose logging to see the full error stack:

    npm run spellcheck --verbose
    

    Alternatively, try running the spellcheck script directly (e.g., node scripts/spellcheck.js) to see if it outputs more specific details—like a missing file, permission error, or code logic bug.

  • Check the spellcheck script's logic and file paths
    If you're using a custom spellcheck script, review its code to ensure it's correctly accessing your Figma extension's files. For example, if it's supposed to scan the dist folder generated by npm run build, confirm the path to dist is correct in the script. Also, look for uncaught exceptions or missing variable declarations that might be crashing the script.

  • Validate your build output structure
    Even if npm run build succeeds, the output files might not match what the spellcheck script expects. Check the dist (or your build output) folder to confirm files are generated in the right location with the correct names. If the spellcheck script is looking for specific file types (like .tsx or .json), make sure those files exist in the build output.

内容的提问来源于stack exchange,提问作者Chris Northcutt

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 12:27:04