项目安装
npm install -g npx
npx create-nuxt-app project name
输入命令后:
npm ERR! code ENOLOCAL
npm ERR! Could not install from “Files\nodejs\node-cache_npx\16376” as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Program Files\nodejs\node-cache_logs\2019-08-07T02_34_54_333Z-debug.log
Install for create-nuxt-app@latest failed with code 1
解决:
npm i -g create-nuxt-app
create-nuxt-app profect name
? Successfully created project mt-app
To get started:
cd mt-app
npm run dev
To build & start for production:
cd mt-app
npm run build
npm run start
这样就可以成功创建项目!