npm run script causes Windows Script Host error

后端 未结 1 1158
遥遥无期
遥遥无期 2021-01-18 16:08

I a trying to use npm to minify javascript.

This is my package.json:

{
  \"name\": \"name1\",
  \"version\": \"1.0.0\",
  \"description\": \"\",
  \"         


        
1条回答
  •  一整个雨季
    2021-01-18 16:19

    The entries under scripts are commands that are run by NPM. They are not simply paths to JavaScript files.

    You need to tell NPM to run your JavaScript tasks using node:

    ...
    "scripts": {
      "minifyjs": "node minifyJs",
      "minifycss": "node minifyCss",
      "minifyhtml": "node minifyHtml"
    },
    ...
    

    0 讨论(0)
提交回复
热议问题