'Paths[1]' expected type 'string', got unconvertible type 'map[string]interface {}'


#1

I get this error for a job:

Configuration errors: 1 error occurred:

  • In step 5 definition: 1 error(s) decoding:
  • ‘Paths[1]’ expected type ‘string’, got unconvertible type ‘map[string]interface {}’

This is the failing run (in case you, the reader, can access that): https://circleci.com/gh/vuejs-templates/webpack/346

I have these steps defined:

  scenario_minimal:
    <<: *vm_settings
    environment:
      - VUE_TEMPL_TEST: minimal
    steps:
      - checkout
      - attach_workspace:
          at: '~/project/webpack-template'
      - restore_cache:
          key: template-cache-minimal-{{ checksum "test-minimal/package.json" }}
      - run:
          name: Install npm dependencies
          working_directory: ~/project/webpack-template/test-minimal
          command: npm install
      - save_cache:
          key: template-cache-minimal-{{ checksum "test-minimal/package.json" }}
          paths:
            - test-minimal/node_modules
      - run:
          name: Test build
          working_directory: ~/project/webpack-template/test-minimal
          command: npm run build

Since the error complains about Step 5, Path[1], it seems that this is the setp it has problems with:

- save_cache:
    key: template-cache-minimal-{{ checksum "test-minimal/package.json" }}
    paths:
      - test-minimal/node_modules

…but I looked at the docs, and this looks perfectly fine to me. Does anyone have any ideas what this means?


#2

Can you add quotes to the path?

i.e. "test-minimal/node_modules"


#3

Done - result is the same error message, unfortunately.

https://circleci.com/gh/vuejs-templates/webpack/350

https://github.com/vuejs-templates/webpack/commit/12bcba268f788e1c3aa8d8df9116cab21bb5dc0f


#4

Carefully pinging this to see if anyone has any other ideas?

Thanks!


#5

Okay, found the mistake - it was an intendation problem in some other part of the yaml.


#6

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