English 中文(简体)
通过EB的平台空白处存放国家预防机制。
原标题:Installing NPM devDependencies via platform hooks on EB

我陷入了一种特殊的局面。 这里粗略的构造:

它是一份 Java版网络应用程序和我的包裹。 json大致看上去:

{
  "name": "project",
  "version": "0.0.1",
  "private": true,
  "engines": {
    "node": "16.17.0"
  },
  "scripts": {
    "start": "webpack && node index.js",
    "dev": "webpack --config webpack.develop.config.js && node index.js"
  },
  "dependencies": {
    "express": "4.18.2",
    
  },
  "devDependencies": {
    "eslint": "6.6.0",
    "style-loader": "1.0.1",
    "url-loader": "3.0.0",
    "webpack": "4.41.2",
    "webpack-cli": "4.7.0"
  }
}

在试图用<代码>NODE_ENV在ElgalBeanstalk上部署时,没有安装这些系统(makes)。 然而,这会造成正本书的起步,造成以下错误:

Dec 20 20:03:52 ip-172-21-128-143 web: One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
Dec 20 20:03:52 ip-172-21-128-143 web: - webpack-cli (https://github.com/webpack/webpack-cli)
Dec 20 20:03:52 ip-172-21-128-143 web: The original webpack full-featured CLI.
Dec 20 20:03:52 ip-172-21-128-143 web: We will use "npm" to install the CLI via "npm install -D".
Dec 20 20:03:56 ip-172-21-128-143 web: Do you want to install  webpack-cli  (yes/no): 

因此,我估计,或许我可以使用预射平台安装。 与此类似:

#!/usr/bin/env bash

echo "Installing webpack-cli"
npm install [email protected] [email protected]

And although I do see the hook running and seemingly installing the webpack-cli & webpack, the application fails to start with the same error message.

I am a little bit lost as to what I am missing here. Is this an order of operations issue, or a permissions thing? From what I see in the eb-engine.log it does npm install first, THEN runs the predeploy hook, so I assumed it would have webpack installed before trying to run npm start ...

Quick Edit:

我还以<代码>---save和-D-g为由,在 h内尝试指挥。

问题回答

如果存在许可问题,我将试图在指挥部中增加指控。

sudo npm install [email protected] [email protected]

如果存在行动令问题,如果它不做工作,那么它就会成为解决办法。 由于布局的部署时间为commands 在这一点上,任何事情都存在。 这应当如此:

commands:
  01_install_webpack:
    command: "sudo npm install [email protected] [email protected]"

如果仍然失败,请查看<代码>cfn-init-cmd.log/code>,以确保该指挥工作顺利完成。





相关问题
VS 2008 : How to publish with out DLLs?

I have developed a web application in Visual Studio 2008 and want to publish it in to the production server. I see a publish option there.But its producing files with DLL. I dont want to publish only ...

Apache: Deploying a new site to the server

I have a site currently live on a domain. I would like to switch it to a new site, that is currently in a password protected sub directory on this server. I have a "Site Maintenance in Progress" page....

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Pylons deployment questions

I m a beginner with Pylons and I ve mostly developed on my localhost using the built-in web server. I think it s time to start deployment for my personal blog, I have a Debian Lenny server with ...

Do I want Publish or Release Build in VB.net?

I wrote a little (like 40 lines little) Winforms application with VB.net in Visual Studio 2010. Now I ve released the code as a Google Code project. It s easy for a developer to get the source but I d ...

Need advice on my PHP development solution

Here is how our current php development solution is set up: Each developer work on their local machine. Each developer commit their change to a common SVN server (intranet). A commit hook upload the ...

loading from JAR files during deployment vs development

when i am loading some data into my java program, i usually use FileInputStream. however i deploy the program as a jar file and webstart, so i have to use getRessource() or getRessourceAsStream() to ...

热门标签