title: grunt : Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
body: <p>I have a problem in a grunt project. I was using node.js 8.x and it worked fine.</p>
  <p>After I update node.js to 14.x I got this error.</p>
  <blockquote>
  <pre class="lang-none prettyprint-override"><code>Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
  </code></pre>
  </blockquote>
  <p>Here is the grunt file :</p>
  <pre class="lang-js prettyprint-override"><code>module.exports = function (grunt) {
  
  var tasks = { scope: ['devDependencies', 'dependencies'] };
  var options = {
      config: { src: &quot;../../base/grunt/*.js&quot; },
      pkg: grunt.file.readJSON('package.json')
  };
  var configs = require('load-grunt-configs')(grunt, options);
  require('load-grunt-tasks')(grunt, tasks);
  grunt.initConfig(configs);
  
  grunt.registerTask('build', [
      'copy', 'sass', 'concat', 'cssmin', 'uglify'
  ]);
  
  grunt.registerTask('deploy', [
      'build',
      'ftp-deploy:uploadToCDN'
  ]);
  
  grunt.registerTask('watcher', [
      'build',
      'watch'
  ]);
  
  grunt.registerTask('site-push', ['copy:importLar', 'liferaySiteGenerate:zipLar']);
  grunt.registerTask('struct-push', ['copy:importStruct', 'liferayStructureGenerate:deployStructures']);
  grunt.registerTask('templates-push', ['copy:importTemplates', 'liferayTemplateGenerate:deployTemplates']);
  
  };
  </code></pre>
  <p>Here is the function to copy function :</p>
  <pre class="lang-js prettyprint-override"><code>module.exports = function () {
  return {
      importJavascript: {
          src: &quot;node_modules/@axiellarena/**/dist/*.dist.js&quot;,
          dest: &quot;src/js/&quot;,
          filter: &quot;isFile&quot;,
          flatten: true,
          expand: true,
          rename: function (dest, src) {
              let start = src.indexOf('js/');
              let end = src.length;
              return dest + '_arena-' + src.substring(start, end);
          }
      },
      importScss: {
          src: [&quot;node_modules/@axiellarena/**/dist/**/*.scss&quot;],
          dest: &quot;src/styles/arena-import/&quot;,
          filter: &quot;isFile&quot;,
          flatten: false,
          expand: true,
          rename: function (dest, src) {
              let start = src.indexOf('dist/') + 5;
              let end = src.length;
              return dest + src.substring(start, end);
          }
      },
      exportScss: {
          src: [&quot;src/styles/**/*.scss&quot;],
          dest: &quot;dist/&lt;%= pkg.path %&gt;/&quot;,
          flatten: false,
          expand: true,
          rename: function (dest, src) {
              let start = src.indexOf('styles/') + 7;
              let end = src.length;
              return dest + src.substring(start, end);
          }
      },
      exportStruct: {
          src: [&quot;src/resources/*&quot;],
          dest: &quot;dist/struct/&lt;%= pkg.path %&gt;&quot;,
          flatten: true,
          expand: true
      },
      exportTemplate: {
          src: [&quot;src/resources/*&quot;],
          dest: &quot;dist/templates/&lt;%= pkg.path %&gt;&quot;,
          flatten: true,
          expand: true
      },
      exportSite: {
          src: [&quot;**&quot;],
          cwd: 'src/resources/lar/',
          dest: &quot;dist/lar/&quot;,
          expand: true
      }
  };
  };
  </code></pre>
  <p>I got the following error:</p>
  <blockquote>
  <pre class="lang-none prettyprint-override"><code>Running &quot;build&quot; task
  (node:11400) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
  (Use `node --trace-warnings ...` to show where the warning was created)
  
  Running &quot;copy&quot; task
  &gt; No &quot;copy&quot; targets found.
  Warning: Task &quot;copy&quot; failed. Use --force to continue.
  </code></pre>
  </blockquote>