我的计算机上有几个不同版本的python.当我在提示符下键入"python"时,如何选择从终端运行哪一个?
我正在尝试使用browserify的防暴自定义标签.
TypeError: Cannot read property 'render' of null while parsing file: /Users/michaelmostachetti/Google_Drive/dev/web/mike_mostachetti_site/app/views/blog.tag
at _html.jade (/Users/michaelmostachetti/Google_Drive/dev/web/mike_mostachetti_site/node_modules/riot/node_modules/riot-compiler/dist/compiler.js:58:26)
at compileTemplate (/Users/michaelmostachetti/Google_Drive/dev/web/mike_mostachetti_site/node_modules/riot/node_modules/riot-compiler/dist/compiler.js:692:10)
at Object.compile (/Users/michaelmostachetti/Google_Drive/dev/web/mike_mostachetti_site/node_modules/riot/node_modules/riot-compiler/dist/compiler.js:717:11)
at Stream.<anonymous> (/Users/michaelmostachetti/Google_Drive/dev/web/mike_mostachetti_site/node_modules/riotify/index.js:16:58)
at _end (/Users/michaelmostachetti/Google_Drive/dev/web/mike_mostachetti_site/node_modules/riotify/node_modules/through/index.js:65:9)
at Stream.stream.end (/Users/michaelmostachetti/Google_Drive/dev/web/mike_mostachetti_site/node_modules/riotify/node_modules/through/index.js:74:5)
at DestroyableTransform.onend (/Users/michaelmostachetti/npm-global/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js:545:10)
at DestroyableTransform.g (events.js:260:16)
at emitNone (events.js:72:20)
at DestroyableTransform.emit (events.js:166:7)
Run Code Online (Sandbox Code Playgroud)
这是我的package.json
"browserify": {
"transform": [
[
"riotify",
{
"template": "jade"
}
]
]
}
Run Code Online (Sandbox Code Playgroud)
这是我的index.js.
var riot = require('riot'),
blogView = require('./views/blog.tag');
riot.mount(blogView);
Run Code Online (Sandbox Code Playgroud)
我只是对错误和出了什么问题感到困惑.我可以将jade编译成html而不会有任何问题.这是文档中的示例.https://github.com/jhthorsen/riotify#usage
我已经解决了相当多的 github 问题和其他看起来类似的堆栈溢出问题。我仍然无法成功让 RVM 正确找到我的 openssl 或为 React Native 安装 2.7.5。我使用的是 OSX 12.6.7。
rvm reinstall 2.7.5
ruby-2.7.5 - #removing src/ruby-2.7.5 - please wait
ruby-2.7.5 - #removing rubies/ruby-2.7.5 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/12.6/x86_64/ruby-2.7.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx_brew.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: …Run Code Online (Sandbox Code Playgroud)