gpt4 book ai didi

javascript - Openshift - 部署 Keystone.JS 时缺少模块

转载 作者:行者123 更新时间:2023-12-02 16:15:06 25 4
gpt4 key购买 nike

我正在尝试安装 keystone.js,但不断出现缺少模块的错误,有人可以帮忙吗?我已经更新了我的 package.json 以包含 cloud-env 依赖项,但仍然不高兴。可用于将 KS 部署到 Openshift 的文档非常少。

Error: Cannot find module 'keystone'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/var/lib/openshift/5501b0c04382ecfefe0000a2/app-root/runtime/repo/web.js:1:78)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
DEBUG: Program node web.js exited with code 8
DEBUG: Starting child process with 'node web.js'

包.json:

{
"name": "node",
"version": "0.0.0",
"private": true,
"dependencies": {
"cloud-env": "^0.1.0",
"keystone": "latest",
"underscore": "latest"
},
"devDependencies": {
"grunt": "~0.4.4",
"grunt-express-server": "~0.4.17",
"grunt-contrib-jshint": "~0.7.1",
"grunt-contrib-compass": "^1.0.1",
"grunt-contrib-csslint": "^0.3.1",
"grunt-contrib-cssmin": "^0.11.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-cssstats": "^1.0.1",
"grunt-stats": "^0.1.0",
"jshint-stylish": "~0.1.3",
"load-grunt-tasks": "~0.4.0",
"load-grunt-configs": "^0.4.1",
"grunt-node-inspector": "~0.1.5",
"time-grunt": "~0.3.1",
"grunt-concurrent": "~0.5.0",
"grunt-nodemon": "~0.2.1",
"open": "0.0.5"
},
"engines": {
"node": ">=0.10.22",
"npm": ">=1.3.14"
},
"scripts": {
"start": "node web.js"
},
"main": "web.js"
}

最佳答案

这是一个迟到的答案,但今天我遇到了同样的问题,以下内容对我有用:

rhc ssh <app>
cd $OPENSHIFT_REPO_DIR
npm install

将应用程序推送到 openshift 时可能出现问题。这样您就可以手动修复软件包。

关于javascript - Openshift - 部署 Keystone.JS 时缺少模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29715036/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com