asp.netgulpasp.net-coregulp-inject

gulp-inject not working in asp.net core project


So I've been working on a asp.net core project and trying to inject scripts using the gulp-inject package. but when I try to use the gulp-inject module in gulpfile.js it throws this error in task-runner window. what am I missing here?

[gulp-inject in package.json

gulp-inject in package.json

task-runner error

task-runner error


Solution

  • This is a known issue. You need to upgrade your version of NodeJS to v4.

    To see your version, open a command prompt and run:

    node --version  
    

    To upgrade, go to https://nodejs.org and find the downloads or look at How do I update node and npm on windows?

    If you're using Visual Studio 2015, also check the version of NodeJS that it is using. Options > Projects and Solutions > External Web Tools shows the locations. From there either:

    1. add C:\Program Files\nodejs as the new top entry, or
    2. move the $(PATH) to the top if it is already up-to-date.

    External Web Tools