search

Home  >  Q&A  >  body text

node.js - gulp serve 报错 求大神节点哪里错了

天蓬老师天蓬老师2787 days ago339

reply all(3)I'll reply

  • PHPz

    PHPz2017-04-17 15:41:26

    The environment variable is wrong

    reply
    0
  • PHPz

    PHPz2017-04-17 15:41:26

    I don’t know if you are talking about gulp-server, so first check whether this plug-in is installed. Just look in the node_modules folder. Then, you can’t see the task you wrote

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 15:41:26

    It feels like browser-sync
    1. Install first: npm install browser-sync --save-dev
    2. var browserSync=require('browser-sync');
    3. gulp .task('browserSync',function(){

    browserSync({
        server:{
            baseDir:'app'//index所在的文件夹
        }
    })

    });
    4. The default address for server startup without error: http://localhost:3000/
    The parameters inside can be configured by yourself

    reply
    0
  • Cancelreply