javascript - Grunt connect-php not found, is it installed? -


i have problem when running grunt serve. says:

local npm module "connect-php" not found. installed?

all other grunt plugins have been installing work fine. , can see plugin map connect-php in node_modules map i'm supposed to.

does problem can be? thanks.

this part added in beginning of gruntfile.

var phpmiddleware = require('connect-php'); 

this part added within grunt.initconfig

connect: {       options: {         debug: true,         livereload: true,         port: 8000,         base: '<%= config.destination %>',       },       rules: [         {from: '(^((?!css|html|js|php|img|font|\/$).)*$)', to: '$1.html'},       ],       dev: {         options: {           middleware: function(connect, options) {     var middlewares = [];     var directory = options.directory || options.base[options.base.length -1];     if (!array.isarray(options.base)) {         options.base = [options.base];     }      middlewares.push(phpmiddleware(directory));      options.base.foreach(function(base) {         // serve static files.          middlewares.push(connect.static(base));     });      // make directory browse-able.      middlewares.push(connect.directory(directory));     return middlewares;             }         }       }     }, 

and have code in end of gruntfile

 grunt.loadnpmtasks('connect-php'); 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -