Я хочу использовать действие git концентратор для тестирования и сборки моего пакета elm всякий раз, когда коммит передается в основную ветку для этого файла моего действия .yml
, похожего на этот
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Elm environment
uses: JorelAli/setup-elm@v1
with:
# Version of Elm to use. E.g. 0.19.1
elm-version: 0.19.1
- run: |
sudo npm install -g elm-test # this fails
elm-test
elm make
для тестирования я хочу использовать elm-test
, который можно установить с помощью npm
, но команда sudo npm install -g elm-test
завершается неудачно с
/usr/local/bin/elm-test -> /usr/local/lib/node_modules/elm-test/bin/elm-test
> elmi-to-json@1.3.0 install /usr/local/lib/node_modules/elm-test/node_modules/elmi-to-json
> binwrap-install
ERR Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/elm-test/node_modules/elmi-to-json/unpacked_bin'
at Object.mkdirSync (fs.js:823:3)
at /usr/local/lib/node_modules/elm-test/node_modules/binwrap/binstall.js:46:10
at new Promise (<anonymous>)
at untgz (/usr/local/lib/node_modules/elm-test/node_modules/binwrap/binstall.js:21:10)
at binstall (/usr/local/lib/node_modules/elm-test/node_modules/binwrap/binstall.js:11:12)
at install (/usr/local/lib/node_modules/elm-test/node_modules/binwrap/install.js:20:10)
at Object.install (/usr/local/lib/node_modules/elm-test/node_modules/binwrap/index.js:14:14)
at Object.<anonymous> (/usr/local/lib/node_modules/elm-test/node_modules/binwrap/bin/binwrap-install:18:9)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
at internal/main/run_main_module.js:17:11 {
errno: -13,
syscall: 'mkdir',
code: 'EACCES',
path: '/usr/local/lib/node_modules/elm-test/node_modules/elmi-to-json/unpacked_bin'
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/elm-test/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elmi-to-json@1.3.0 install: `binwrap-install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the elmi-to-json@1.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2020-02-03T17_50_06_232Z-debug.log
Любой совет о том, как установить elm-test
внутри действия git концентратора ?
Редактировать: без sudo
ошибка становится
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2020-02-04T13_41_34_534Z-debug.log