<p>I use Minikube for simulating my Kubernetes production architecture.
In the cluster, I need to create a website and I decided to use Sails.js.</p>

<p>Here is my Kubernetes configuration :</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: white-label-storage-persistent-volume
  labels:
    type: local
    app: white-label
    role: master
    tier: backend
spec:
  storageClassName: manual
  capacity:
    storage: 5Gi
  accessModes:
  - ReadWriteMany
  hostPath:
    path: "/white-label-data"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: white-label-storage-persistent-volume-claim
  labels:
    app: white-label
    role: master
    tier: backend
spec:
  storageClassName: manual
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 5Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: white-label-deployment
  labels:
    app: white-label
    role: master
    tier: backend
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: white-label
      role: master
      tier: backend
  template:
    metadata:
      labels:
        app: white-label
        role: master
        tier: backend
    spec:
      containers:
      - name: white-label
        image: pastel-white-label:v1
        imagePullPolicy: IfNotPresent
        workingDir: "/usr/src/app"
        resources:
          requests:
            memory: 2Gi
            cpu: 1
          limits:
            memory: 4Gi
            cpu: 2
        ports:
        - containerPort: 1337
          protocol: TCP
        volumeMounts:
        - mountPath: "/data"
          name: white-label-persistent-volume
      volumes:
        - name: white-label-persistent-volume
          persistentVolumeClaim:
            claimName: white-label-storage-persistent-volume-claim
---
apiVersion: v1
kind: Service
metadata:
  name: white-label-service
  labels:
    app: white-label
    role: master
    tier: backend
spec:
  type: LoadBalancer
  ports:
  - port: 1337
    protocol: TCP
    nodePort: 30003
  selector:
    app: white-label
    role: master
    tier: backend
  sessionAffinity: None
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  name: white-label-hpa
  labels:
    app: white-label
    role: master
    tier: backend
  namespace: default
spec:
  maxReplicas: 5
  minReplicas: 1
  scaleTargetRef:
    apiVersion: extensions/v1
    kind: Deployment
    name: white-label-deployment
  targetCPUUtilizationPercentage: 80
</code></pre>

<p>And here is the pastel-white-label:v1 Docker image :</p>

<pre><code>FROM node:10.13.0-stretch

WORKDIR /usr/src/app
COPY . ./

RUN npm install -g sails npm-check-updates
RUN npm install @sailshq/connect-redis --save
RUN npm install

CMD ["sails", "lift"]
</code></pre>

<p>When I start my cluster and build my pod, everything works like a charm.
My Sails.js log is spotless, I can see the home page in the browser: no problem at all. I use Sails.js v1.1.0 in Web app mode out of the box BTW. I can see as well that Grunt is launched and is watching.</p>

<p>Now if I edit a .less file though, I get an unfriendly:</p>

<pre><code>debug: -------------------------------------------------------
error: ** Grunt :: An error occurred. **
error: 
------------------------------------------------------------------------

Aborted due to warnings.
Running "watch" task
Waiting...
&gt;&gt; File "assets/styles/styleguide/colors.less" changed.
Loading "sync.js" tasks...ERROR
&gt;&gt; TypeError: Cannot read property 'length' of undefined
Warning: Task "sync:dev" not found.
</code></pre>

<p>I am sure my .less file has no error (hexa code edition), my .tmp folder is writable (touch .tmp/foo is working for instance) and I believe Grunt is correctly installed as it comes out of the box...</p>

<p>Then I really don't know what is going on here...</p>

<p>Do you guys have an idea, please ?</p>

<p>Thank you ahead</p>

<p>I think you are running into exactly <a href="https://github.com/balderdashy/sails/issues/4513" rel="nofollow noreferrer">this</a>. Looks like it's specific to the node version. You can try an earlier version for your node docker image:</p>

<pre><code>FROM node:8.12.0-stretch
</code></pre>
