语法错误:意外的令牌,将GitLab仓库中的项目发布到Heroku时

a14dhokn  于 2023-08-06  发布在  Git
关注(0)|答案(1)|浏览(108)

我试图将我的项目从GitLab仓库部署到Heroku,在最后一个阶段,发布应用程序,抛出此SyntaxError。我尝试使用不同的方法重新安装Heroku,包括brew和NPM。还查看了中的command.js文件

/usr/local/lib/heroku/node_modules/@oclif/core/lib/command.js

字符串
它包含了这个代码,delete this.globalFlags?.json;,但我到目前为止还没有任何线索。所有的应用程序和工具都是最新版本。
以下是GitLab部署的错误消息。

/usr/local/lib/heroku/node_modules/@oclif/core/lib/command.js:41
            delete this.globalFlags?.json;
                                    ^
SyntaxError: Unexpected token .
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/local/lib/heroku/node_modules/@oclif/core/lib/index.js:6:19)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

xmjla07d

xmjla07d1#

我更新了图片:节点:10.17-alpine到图像:node:14-alpine on my gitlab-ci.yml and my app successfully deployed!

相关问题