Error code: 800A1391 Source: Microsoft JScript runtime error Running Grunt - Module is undefined

前端 未结 9 1411
臣服心动
臣服心动 2021-01-03 22:21

New Grunt user here who is using a lot of new tools (npm nodejs) today.

I\'ve got Grunt \"installed\" and have been able to create a grunt.js file using the init tas

9条回答
  •  误落风尘
    2021-01-03 22:44

    As Florian F suggested, running grunt.cmd works. This is because of the process Windows is looking for your grunt command.

    When typing grunt -h Windows will proceed to look for the following files:

    1. ./grunt.cmd
    2. ./grunt.* (grunt.js is found in this case which is why you see "module is undefined")
    3. %APPDATA%/npm/grunt.cmd

    An alternative to using "grunt.cmd" is to use grunter which simply renames the command to grunter... then you no longer have this problem.

提交回复
热议问题