@jekanok

Почему неправильно устанавливаются зависимости в netlify?

У меня есть проект с кастомными плагинами который нуждается 5 версии webpack, но когда я запускаю build на сервер netlify вижу что он устанавливает версию 3.12 и через это падает сборка, + я ставлю версию npm ^8 а он все равно ставит 6... почему так происходит?
netlify.config
[build.environment]
NODE_VERSION = "14"
NPM_VERSION = "^8"
NETLIFY_USE_YARN = "true"
AWS_LAMBDA_JS_RUNTIME = "nodejs14.x"


package.json плагина
"dependencies": {
    "@babel/core": "^7.21.0",
    "@babel/plugin-proposal-class-properties": "^7.18.6",
    "@babel/preset-env": "^7.20.2",
    "babel-loader": "^9.1.2",
    "trublue-sanity-helper": "file:../../lib/lambda-dependencies/sanity-helper",
    "webpack": "^5.76.0",
    "webpack-cli": "^5.0.1",
    "webpack-node-externals": "^3.0.0"
  }
}


вот что выдает мне сам netlify
Plugin "./netlify-plugins/build-lambda-functions" internal error

Error: Command failed: npm run build --prefix  lambdas/identity-signup
webpack 3.12.0
Usage: https://webpack.js.org/api/cli/
Usage without config file: webpack <entry> [<entry>] <output>
Usage with config file: webpack


Config options:
--config       Path to the config file
[string] [default: webpack.config.js or webpackfile.js]
--config-name  Name of the config to use                              [string]
--env          Environment passed to the config, when it is a function





Unknown arguments: mode, node-env
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! identity-signup-event@1.0.0 build: webpack --mode=production --node-env=production
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the identity-signup-event@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
  • Вопрос задан
  • 60 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы