小编Ank*_*mar的帖子

无法在heroku上推送node.js应用

我尝试在heroku上推送我的node.js应用程序。无法为此应用检测到默认语言。我什至尝试了heroku buildpacks:set heroku / nodejs。但是仍然无法推动。

 Counting objects: 31, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (24/24), done.
    Writing objects: 100% (31/31), 5.37 KiB | 0 bytes/s, done.
    Total 31 (delta 3), reused 0 (delta 0)
    remote: Compressing source files... done.
    remote: Building source:
    remote: 
    remote:  !     No default language could be detected for this app.
    remote:             HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
    remote:             See https://devcenter.heroku.com/articles/buildpacks
    remote: 
    remote: …
Run Code Online (Sandbox Code Playgroud)

javascript git heroku node.js

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

在javascript中从数组中删除对象

我正在尝试使用art_id从购物车中删除一个对象,但是当我收到此错误时SyntaxError: Delete of an unqualified identifier in strict mode.为什么会发生这种情况,如何修改我的代码来解决此错误

 function remove_from_cart(req, res, next) {
        console.log(req.session);
        var art_id = req.params._id;

        var art_to_remove = _.findWhere(req.session.cart, {
            art_id: art_id
        });

        console.log(art_to_remove);
        delete art_to_remove;
        console.log(req.session);
        res.send('deleted')
    }
Run Code Online (Sandbox Code Playgroud)

javascript node.js

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

标签 统计

javascript ×2

node.js ×2

git ×1

heroku ×1