setup-ionic
setup-ionic copied to clipboard
Install fails when NodeJS is preinstalled
Might be worth just a documentation update:
This fails:
steps:
- name: Deploy NodeJS
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Install Ionic
uses: coturiv/[email protected]
- name: Checkout UI
uses: actions/checkout@v2
- run: npm install
- run: npm run build
- run: npm test
with
Run coturiv/[email protected]
Error: Command failed: node -p "require('/opt/hostedtoolcache/node/12.18.4/x64/lib/node_modules/@ionic/cli/package.json').version"
internal/modules/cjs/loader.js:968
throw err;
^
Error: Cannot find module '/opt/hostedtoolcache/node/12.18.4/x64/lib/node_modules/@ionic/cli/package.json'
Require stack:
- /home/runner/work/insect-ui/insect-ui/[eval]
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at [eval]:1:1
at Script.runInThisContext (vm.js:120:18)
at Object.runInThisContext (vm.js:309:38)
at Object.<anonymous> ([eval]-wrapper:10:26)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at evalScript (internal/process/execution.js:94:25) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/runner/work/insect-ui/insect-ui/[eval]' ]
}
at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
killed: false,
code: 1,
signal: null,
cmd: `node -p "require('/opt/hostedtoolcache/node/12.18.4/x64/lib/node_modules/@ionic/cli/package.json').version"`
}
Error: ENOENT: no such file or directory, stat '/opt/hostedtoolcache/node/12.18.4/x64/lib/node_modules/@ionic/cli'
Removing the Deploy NodeJS step fixes it. Might be worth to add a note to the doku: Don't install NodeJS first!
Love your work!
It would be nice to be able to install NodeJS first, so the cache module could help for the ionic-cli install time