从 WSL 升级到 WSL2 后
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)
不再起作用。后:
wsl --set-version Ubuntu-18.04 2
输出是:
> sudo apt-get update
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Temporary failure resolving …
Run Code Online (Sandbox Code Playgroud) 这是同一个问题,这里正确回答了jest global variable example,但问题是 Typescript。
console.log(__DEV__);
Run Code Online (Sandbox Code Playgroud)
结果是:
console.log(__DEV__);
Run Code Online (Sandbox Code Playgroud)
全局变量__DEV__
在 package.json 中定义为:
"jest": {
"globals": {
"__DEV__": true
}
}
Run Code Online (Sandbox Code Playgroud)
有人有解决方案或解决方法吗?
相关笑话文档:https://jestjs.io/docs/en/next/configuration#globals-object
我是骆驼的新手,更喜欢使用 Spring DSL 进行路由定义。现在我发现它令人困惑,http 查询字符串参数被命名和处理为标头,它们不是。这是骆驼的架构错误吗?
apache-camel ×1
apt ×1
debian ×1
dsl ×1
http-headers ×1
jestjs ×1
typescript ×1
ubuntu ×1
uri ×1
windows-subsystem-for-linux ×1
wsl-2 ×1