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

构建vue是否能指定命令? #2

Open
llzzrr opened this issue Jun 28, 2021 · 1 comment
Open

构建vue是否能指定命令? #2

llzzrr opened this issue Jun 28, 2021 · 1 comment

Comments

@llzzrr
Copy link

llzzrr commented Jun 28, 2021

构建vue的时候,能不能指定使用什么命令?想使用cnpm进行构建。不然会出现下载不到依赖的情况 @srillia

@srillia
Copy link
Owner

srillia commented Jul 2, 2021

第一种解决办法:

使用 --build-cmds 参与可以覆盖,默认的执行命令,eg: --build-cmds cnpm build:dev ,就可以取代程序原有来要执行的npm build:dev

第二种解决办法:

1.切换淘宝源(同理,也可以使用其他源)
npm config set registry https://registry.npm.taobao.org --global
2.验证配置
npm config get registry
3.使用cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants