【发布时间】:2019-09-26 15:15:27
【问题描述】:
我可以在本地运行应用程序,但是 Heroku 构建日志给出了
-----> Installing dependencies
Installing node modules (package.json + package-lock)
npm ERR! path /tmp/build_f006003c37b56af35aede303d1931e45/node_modules/@domain/endpoints
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/tmp/build_f006003c37b56af35aede303d1931e45/node_modules/@domain/endpoints'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.iEXJN/_logs/2019-09-25T14_25_49_996Z-debug.log
-----> Build failed
如您所见,它抱怨“@domain/endpoints”不存在。但我删除了对“@domain/endpoints”的所有引用。那么为什么会这样呢?
部署通过从我们的 BitBucket 存储库上的开发分支到 Heroku 的管道进行。我检查了开发分支不包含对“@domain/endpoints”的引用。
“@domain”模块包含我们自己创建的包。
我的 package.json 文件可以在这里找到:https://pastebin.com/mB7LcvBH 我在顶部更改了名称,希望不会在其他地方造成任何不一致。
【问题讨论】:
-
你能显示 package.json 文件吗?
-
@karthikdivi 完成 :)