yarn create @umijs/umi-app 在windows 7下报错

我把npm重新安装了好多次,终于搞好了
网上查的好多方法都不行。

安装好npm后,把NPM的安装目录放到windows the path 里面。
然后再在nodejs的文件夹下建两个文件夹。
global 和 cache
然后就这样:
yarn config set global-folder “E:\Program\nodejs\global”

yarn config set cache-folder “E:\Program\nodejs\cache”

问题还是解决不了哦。

然后直接用:
yarn add umi
yarn umi g page index --typescript --less
yarn umi dev
兄弟们,成功了。这个问题搞了我三天。。
成功了还是不对的。
还有两个最重要的步骤:
1.就是文件夹的名字不能有空格。有空格 yarn create @umijs/umi-app 这个就会报错的。
2.就弄一个文件夹,把
npm config set prefix “E:\Program\node-v12.22.12-win-x86\node_global”
npm config set cache “E:\Program\node-v12.22.12-win-x86\node_cache”
都要放到一个文件夹下。
成功的

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
apisix-dashboard编译 如下,请帮助解决:Error: build failed at /usr/local/apisix-dashboard/web/node_modules/@umijs/bundler-webpack/lib/index.js:177:29 at finalCallback (/usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:108196:12) at /usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:108219:6 at done (/usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:67212:13) at runCompilers (/usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:108123:48) at /usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:108130:7 at /usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:108212:7 at finalCallback (/usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:98589:39) at /usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:98605:13 at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:147581:10), <anonymous>:51:1) at AsyncSeriesHook.lazyCompileHook (/usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:147518:20) at onCompiled (/usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:98603:21) at /usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:99013:15 at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:147581:10), <anonymous>:6:1) at AsyncSeriesHook.lazyCompileHook (/usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:147518:20) at /usr/local/apisix-dashboard/web/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:99010:31
07-14
这个误信息表明在编译 `apisix-dashboard` 项目时出现了误。要解决这个问题,可以尝试以下几个步骤: 1. 检查项目依赖:首先,确保你的 `apisix-dashboard` 项目的依赖项已经正确安装。进入项目目录并运行 `npm install` 或者 `yarn` 命令,以确保所有依赖都被正确下载和安装。 2. 清除缓存:有时候编译误可能是由于缓存问题导致的。尝试运行 `npm cache clean --force` 或者 `yarn cache clean` 命令来清除缓存,然后再次尝试编译项目。 3. 更新依赖:检查你的 `apisix-dashboard` 项目的依赖项是否有更新版本。你可以尝试更新一些关键依赖的版本,例如 webpack、@umijs/bundler-webpack 等。在项目根目录运行 `npm outdated` 或者 `yarn outdated` 命令来查看可更新的依赖项,并尝试更新它们。 4. 检查配置文件:检查你的 webpack 配置文件是否正确,并且没有语法误或者配置误。确保文件路径、loader 和插件等配置项都是正确的。 5. 查看详细误信息:尝试查看更详细的误信息,以便定位问题所在。在终端输出中可能会有更多的误堆栈信息,可以根据这些信息进一步分析问题并采取相应的解决措施。 如果以上步骤都没有解决问题,建议你提供更多关于误的详细信息,例如完整的误堆栈跟踪信息或者其他相关的误提示,这样可以更好地帮助我们定位问题所在并提供更准确的解决方案。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值