0

here's my build spec file:

# 0.1 : shell for each command 
# 0.2 : shell keeps its settings
# https://stackoverflow.com/a/45115791/28004
version: 0.2 

phases:
  install:
    commands:
      - echo INSTALL started on `date`
      - cd wp-content/themes/sitecampaign-sage
      - echo `pwd`
      - npm install bower -g
      - npm install grunt -g
      - npm install gulp -g
      - echo INSTALL completed on `date`
  pre_build:
    commands:
      - echo PRE_BUILD started on `date`
      - echo `pwd`
      - bower -v
      - node -v
      - npm -v
      - gulp -v
      - gulp default
      - echo PRE_BUILD completed on `date`
  build:
    commands:
      - echo BUILD started on `date`
      - echo `pwd`
#      - gulp
      - echo BUILD completed on `date`
  post_build:
    commands:
      - echo POST_BUILD started on `date`
      - echo `pwd`
      - rm -rf node_modules
      - rm -rf bower_components
      - echo POST_BUILD completed on `date`
artifacts:
  files:
    - /**/*
  discard-paths: no

but even if gulp -v returns the gulp version correctly, running gulp or gulp default (gulp ) says gulp is not installed !???

what am I missing? anyone with the same issue?

balexandre
  • 73,608
  • 45
  • 233
  • 342
  • Possible duplicate of [No local gulp install found even after installing npm install -g gulp](https://stackoverflow.com/questions/23284805/no-local-gulp-install-found-even-after-installing-npm-install-g-gulp) – Unsigned Jul 25 '17 at 19:56

1 Answers1

2

forgot all about running npm install and bower install ... to much focus on the tools itself and I forgot to simply run the day-to-day commands...

the final file specs:

# 0.1 : shell for each command 
# 0.2 : shell keeps its settings
# https://stackoverflow.com/a/45115791/28004
version: 0.2 

phases:
  install:
    commands:
      - echo INSTALL started on `date`
      - cd wp-content/themes/sitecampaign-sage
      - echo `pwd`
      - npm install bower -g
      - npm install grunt -g
      - npm install gulp -g
      - npm install
      - bower install --allow-root
      - echo INSTALL completed on `date`
  pre_build:
    commands:
      - echo PRE_BUILD started on `date`
      - echo `pwd`
      - bower -v
      - node -v
      - npm -v
      - gulp -v
      - which gulp
      - echo PRE_BUILD completed on `date`
  build:
    commands:
      - echo BUILD started on `date`
      - echo `pwd`
      - which gulp
      - gulp default
      - echo BUILD completed on `date`
  post_build:
    commands:
      - echo POST_BUILD started on `date`
      - echo `pwd`
      - rm -rf node_modules
      - rm -rf bower_components
      - echo POST_BUILD completed on `date`
artifacts:
  files:
    - /**/*
balexandre
  • 73,608
  • 45
  • 233
  • 342