电脑坏了,nextjs编译不过,2个小时了不管是cmd pwsh bash pnpm build npm run build,好几个终端没有一个有进度的
让ai看半天也看不出来
佬友们带带弟弟吧dddd
电脑坏了,nextjs编译不过,2个小时了不管是cmd pwsh bash pnpm build npm run build,好几个终端没有一个有进度的
让ai看半天也看不出来
佬友们带带弟弟吧dddd
佬友有更多上下文吗?项目仓库能看吗(如果方便的话)?这些信息似乎不太够。
哪个项目都不行,刚刚初始化的nextjs也不行,换了台电脑一切正常
运行 which npm 看看。
Administrator@DESKTOP-BF2AB85 MINGW64 /e/uniFigma/admin-system (main)
$ which npm
/c/Program Files/nodejs/npm
怪怪的。再试试 npm --help?如果还不行,也许应该尝试用 nvm 重新配置一下环境。
Microsoft Windows [版本 10.0.19045.6093]
(c) Microsoft Corporation。保留所有权利。
C:\Users\Administrator>which npm
'which' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:\Users\Administrator>npm --help
npm <command>
Usage:
npm install install all the dependencies in your project
npm install <foo> add the <foo> dependency to your project
npm test run this project's tests
npm run <foo> run the script named <foo>
npm <command> -h quick help on <command>
npm -l display usage info for all commands
npm help <term> search for help on <term> (in a browser)
npm help npm more involved overview (in a browser)
All commands:
access, adduser, audit, bugs, cache, ci, completion,
config, dedupe, deprecate, diff, dist-tag, docs, doctor,
edit, exec, explain, explore, find-dupes, fund, get, help,
help-search, hook, init, install, install-ci-test,
install-test, link, ll, login, logout, ls, org, outdated,
owner, pack, ping, pkg, prefix, profile, prune, publish,
query, rebuild, repo, restart, root, run-script, sbom,
search, set, shrinkwrap, star, stars, start, stop, team,
test, token, uninstall, unpublish, unstar, update, version,
view, whoami
Specify configs in the ini-formatted file:
C:\Users\Administrator\.npmrc
or on the command line via: npm <command> --key=value
More configuration info: npm help config
Configuration fields: npm help 7 config
[email protected] C:\Users\Administrator\AppData\Roaming\nvm\v22.16.0\node_modules\npm
C:\Users\Administrator>
可vite编译是正常的
是否刚配置完环境没有重启?有时候部分环境变量在重启后才生效。
离上次重装过了半年了,一觉起来突然就这样的
加 --verbose看看
不会是在小水管拉包吧(
或者死循环依赖喵?
是不是没配置镜像源?可手动配置或用 chsrc 工具配置。这种是真难受。我可能推荐用 nvm 重新配置环境。
初始化的nextjs也编译不了,这台电脑编译过很多次nextjs了
Administrator@DESKTOP-BF2AB85 MINGW64 /e/uniFigma/admin-system (main)
$ pnpm build --verbose
> [email protected] build E:\7mouthMission\uniFigma\admin-system
> next build "--verbose"
error: unknown option '--verbose'
ELIFECYCLE Command failed with exit code 1.
佬装了nvm吗,先尝试切换下node版本
怀疑是不是硬盘或操作系统出问题了。CMD 下运行 sfc /scannow 检查文件系统和 dism /Online /Cleanup-image /CheckHealth 检查。
22换23还是一样
卡这里
Administrator@DESKTOP-BF2AB85 MINGW64 /e/uniFigma/admin-system (main)
$ pnpm build --debug
> [email protected] build E:\7mouthMission\uniFigma\admin-system
> next build "--debug"
唔 试试其他佬友的办法吧(瘫
如果之前没尝试删除过node_modules和锁文件重新安装 还是可以先试试的喵(