Package.json缺少脚本:stg

时间:2018-12-20 01:19:17

标签: npm continuous-integration nvm codeship

使用代码船部署到AWS。出现类似错误

npm ERR! missing script: stg

自定义脚本

git clone https://${GITHUB_KEY}@github.com/me/myproject.git
ls

cd myproject
composer install --no-interaction --prefer-dist
nvm install 6.9.4
npm install sync-exec
npm install
npm rebuild node-sass
npm run stg

部分Webpack

"scripts": {
    "clean": "rimraf public/dist",
    "watch": "webpack --config webpack.dev.config.js --watch --progress",
    "dev": "webpack --config webpack.dev.config.js --progress",
    "prod": "cross-env npm run clean && NODE_ENV=production webpack --config webpack.config.js --progress --profile --colors",
    "stg": "cross-env npm run clean && NODE_ENV=stage webpack --config webpack.dev.config.js --progress --profile --colors",
    "lint": "eslint ./app/**/**.js"
  },

代码错误

  npm run stgnpm ERR! Linux 4.15.0-1009-aws
npm ERR! argv "/home/rof/.nvm/versions/node/v6.9.4/bin/node" "/home/rof/.nvm/versions/node/v6.9.4/bin/npm" "run" "stg"
npm ERR! node v6.9.4
npm ERR! npm  v3.10.10

npm ERR! missing script: stg
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/rof/src/github.com/myaccountname/myproject/myproject/npm-debug.log

0 个答案:

没有答案