Module binaries missing in CI


(Benny Powers) #1

Hello! I’m having problems running npm scripts in ci.

/package.json:

{
  "scripts": {
    "postinstall": "cd public && npm install",
    "build:client": "cd public && npm run build",
    "build": "run-s build:**",
  },
  "devDependencies": {
    "npm-run-all": "^4.1.3",
  }
}

public/package.json

{
  "scripts": {
    "build": "run-s clean build:*",
    "build:app": "rollup --config",
    "build:serviceworker": "workbox injectManifest workbox-config.js",
  },
  "devDependencies": {
    "npm-run-all": "^4.1.3",
  }
}

This runs fine locally, but when I run in ci I get:

sh: run-s: not found

So far I’ve tried changing the ci command from npm ci to npm install with no change.

I’m using gitlab-ci.

I’ve added echo "unsafe-perm=true" > ~/.npmrc to my CI scripts before running any npm stuff, in order to get postinstall working. Could that be involved?


(Benny Powers) #2

Seems like this was a CI config problem. I explicitly cached node_modules between CI stages and that solved it. :muscle:


(system) #3

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.