Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails when NodeJS is preinstalled #10

Open
Stwissel opened this issue Oct 6, 2020 · 1 comment
Open

Install fails when NodeJS is preinstalled #10

Stwissel opened this issue Oct 6, 2020 · 1 comment

Comments

@Stwissel
Copy link

Stwissel commented Oct 6, 2020

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!

@Stwissel
Copy link
Author

Stwissel commented Oct 6, 2020

It would be nice to be able to install NodeJS first, so the cache module could help for the ionic-cli install time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant