Comments (4)
这个报错是不是因为你的node版本并没有在7.6之上呢?async、await的语法需要在node7.6以上才能实现。
我的launch.json配置如下:
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
},
{
"type": "node",
"request": "attach",
"name": "Attach to Port",
"address": "localhost",
"port": 9229,
"restart": true
}
]
}
需要先用nodemon运行项目再进行调试,因为是attach to port的方式。注意看我package.json里的npm run server 跑的命令。
from vue-koa-demo.
node 版本7.6.0,launch.json使用你上面的配置,启动调试,ide报错:
"无法启动程序”/Users/xiongsheng/personal_project/Github/vue-koa-demo/.vscode/launch.json“;设置”outFiles“属性可能会有帮助"
npm run server执行是成功的
from vue-koa-demo.
看了一下是vscode更新导致的。另外由于它的更新现在可以直接配置nodemon调试了。所以我更新了一下调试的配置,直接通过debug来启动server端就行了。注意在debug的时候需要选择一下你使用的配置,是从nodemon启动的:
{
"type": "node",
"request": "launch",
"name": "nodemon",
"runtimeExecutable": "nodemon",
"program": "${workspaceFolder}/server-entry.js",
"restart": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
from vue-koa-demo.
哈哈哈,总算搞定了,非常感谢
from vue-koa-demo.
Related Issues (20)
- Docker support HOT 2
- 新年好,楼主请帮忙,这是es6的转义导致的吗? HOT 1
- bcrypt.compareSync is not a function
- ssr分支->reademe.md 对.env配置说明有误 HOT 1
- 代理端口号出错 HOT 6
- 单元测试里面有国际化i18n 报错 HOT 1
- 运行时报错 HOT 1
- 运行时遇到一些问题 HOT 2
- 作者大大,方便交流下nginx配置吗? HOT 1
- 关于开发环境下ssr的问题 HOT 2
- ssr index.html的问题 HOT 1
- 为什么不能使用import HOT 1
- 库主是用什么版本的linux系统?安装yarn add sequelize mysql HOT 5
- 想搭建远程调试,一直不成功 HOT 7
- 【单元测试】:全局方法的引入 HOT 5
- [单元测试] vue-router的跳转怎么验证? HOT 2
- 数据库连接报错 HOT 5
- server-entry.js 使用babel registry在生产环境是否会造成性能问题 HOT 1
- ssr webpack-hot-middleware error HOT 5
- can this framework handle image uploading and hosting? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-koa-demo.