小编Chr*_*ris的帖子

如何解决 Mac 上的 npm 安装错误

我在线购买了 Gatsby JS 网站的模板,当我尝试使用它时,它起作用了,但随后就停止了。我尝试在新目录中打开该项目,但失败了。

目前我无法运行npm install该项目,也不知道如何解决该问题。

错误消息是:

    npm ERR! code 1
    npm ERR! path /Users/chistopherholder/Desktop/react_play/rewy-gatsby-with-strapi/rewy-api/node_modules/sharp
    npm ERR! command failed
    npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
    npm ERR! info sharp Using cached /Users/chistopherholder/.npm/_libvips/libvips-8.10.0-darwin-x64.tar.br
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using node-gyp@3.8.0
    npm ERR! gyp info using node@14.15.5 | darwin | x64
    npm ERR! gyp info spawn /usr/bin/python2
    npm …
Run Code Online (Sandbox Code Playgroud)

npm-install

9
推荐指数
1
解决办法
1万
查看次数

类型错误:get_bind() 获得意外的关键字参数

我正在尝试在烧瓶中使用数据库

from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
Run Code Online (Sandbox Code Playgroud)

在其中我创建了一个基本的登录页面和一个注册页面,当我尝试使用 html 代码时:

<form action="/login" method="post">
        <input autocomplete="off" autofocus name="username" placeholder="Username" type="text">
        <input class="form-control" name="password" placeholder="Password" type="password">
    <button class="btn btn-primary" type="submit">Log In</button>
            <li style="list-style-type:none;"><a href="/register">Register</a></li>
</form>
Run Code Online (Sandbox Code Playgroud)

在这个Python Flask代码上:

# This is the log in page
@app.route("/login", methods=["GET", "POST"])
def login():
    """Log user in"""

    # Forget any user_id
    session.clear()

    # User reached route via POST (as by submitting a form via POST)
    if request.method == "POST":

        # Ensure username was submitted …
Run Code Online (Sandbox Code Playgroud)

python postgresql flask flask-sqlalchemy

2
推荐指数
1
解决办法
9456
查看次数