0

I use rollup to compile a Svelte application. As you can see, Rollup is defined as a devdependency.

When running this pipeline, the pipeline exists with the following error: sh: 1: rollup: not found Could it be that devDependencies are not installed correctly?

package.json

"devDependencies": {
    "rollup": "^2.67.2",
    ....
}

.gitlab-ci.yml

image: node:latest

cache:
  key:
    files:
      - package-lock.json
  paths:
    - .npm/

setup_firebase:
  stage: .pre
  script:
    - npm i -g firebase-tools
    - echo FIREBASE_API_KEY=$FIREBASE_PROJECT_API_KEY >> .env

npm_install:
  stage: .pre
  script:
    - npm ci --include=dev --cache .npm --prefer-offline

compile_app:
  stage: build
  script:
    - npm run build

deploy_app:
  stage: deploy
  script:
    - firebase deploy --only hosting --token $FIREBASE_TOKEN
  only:
    refs:
      - main
studio-pj
  • 689
  • 6
  • 19
  • Have you seen this question: https://stackoverflow.com/questions/34700610/npm-install-wont-install-devdependencies (maybe the issue is `NODE_ENV`) – H.B. Jul 05 '22 at 19:33
  • Apart from the `NODE_ENV`, `--include=dev` should install devDependencies anyway, isn't it? – studio-pj Jul 05 '22 at 20:04
  • I have not found that argument in the documentation, does that even exist? – H.B. Jul 05 '22 at 21:22

0 Answers0