检查 npxjavascript
// npm 5.2.0 以上版本默认包含 npx // 建立项目 npx create-nuxt-app project_name
Choose the package manager Yarn 须要安装 yarn 安装 yarnjava
yarn 下载typescript
配置参考npm
配置详解服务器
? Project name nuxttest //项目名称 ? Project description My astounding Nuxt.js project //项目描述 ? Author name forever //做者姓名 ? Choose programming language JavaScript //选择开发的语言 javascript or typescript ? Choose the package manager Yarn //选择包管理的工具 npm or yarn ? Choose UI framework Element //选择一个UI框架 ? Choose custom server framework Express //选择一种服务端框架 ? Choose Nuxt.js modules (Press <space> to select, <a> to toggle all, <i> to invert selection) ? Choose linting tools (Press <space> to select, <a> to toggle all, <i> to invert selection) //检查代码是否规范 ? Choose test framework None //选择一个测试框架 ? Choose rendering mode Universal (SSR) //选择一种渲染模式 SSR or SPA ? Choose development tools (Press <space> to select, <a> to toggle all, <i> to invert selection)
npm start
访问报错 NuxtServerError:Request failed with status code 500app
解决框架
//升级 npm npm install npm -g
从新运行工具
运行效果测试