Gruntjs Grunt突然找不到更少的目录

Gruntjs Grunt突然找不到更少的目录,gruntjs,less,Gruntjs,Less,因此,我一直在使用Grunt编译我的较少的文件,它工作得很好,我的gruntfile.js设置正确,但突然我的终端现在说 Running "less:components" (less) task Warning: Cannot find module '/Users/../path/to/directory/../less' Use --force to continue. less目录肯定是它应该在的地方,所以我不明白为什么会发生这种情况。有什么建议吗 编辑:npm列表的结果显示了一个长列

因此,我一直在使用Grunt编译我的较少的文件,它工作得很好,我的gruntfile.js设置正确,但突然我的终端现在说

Running "less:components" (less) task
Warning: Cannot find module '/Users/../path/to/directory/../less' Use --force to continue.
less目录肯定是它应该在的地方,所以我不明白为什么会发生这种情况。有什么建议吗

编辑:npm列表的结果显示了一个长列表,看起来还可以,但最后确实给出了这个错误

npm ERR! extraneous: grunt-cli@0.1.13 /Users/../path/../node_modules/grunt-cli
npm ERR! missing: nopt@~2.0.0, required by noptify@0.0.3
npm ERR! missing: cwd@^0.3.3, required by resolve-dep@0.4.1
npm ERR! missing: cwd@^0.3.3, required by load-pkg@0.1.0
npm ERR! not ok code 0
Gruntfile.js中较少的配置如下所示

less: {
      components: {
        files: {         
          'compiled_css/login.css': ['less/login.less'],
          'compiled_css/front.css': ['less/_import.less']          
        }
      },
      options: {
        expand: true,
        paths: [
        'bower_components/bootstrap/less',
        'less'
        ]
      }
    },

好的,我设法解决了这个问题。我从根目录中删除了node_modules目录,并再次运行了npm安装


然后运行咕噜,一切正常。

它说找不到模块。发布npm列表的输出。如果结果太长,请压缩结果,同时也要压缩任务较少的配置。我对原始问题进行了编辑。