MMF-FE / svgicon

SVG icon components and tool set
https://mmf-fe.github.io/svgicon
MIT License
922 stars 95 forks source link

Error: ENOENT: no such file or directory icon.tpl.txt #26

Closed lianghuilin closed 7 years ago

lianghuilin commented 7 years ago

please help me,i got error message like this:

$ npm run svg

> factoring_weixin@1.0.0 svg E:\dev_workspace\cloud_static
> node ./build/svg.js -s ./src/svg -t ./src/icons

fs.js:641
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'E:\dev_workspace\cloud_static\icon.tpl.txt'
    at Error (native)
    at Object.fs.openSync (fs.js:641:18)
    at Proxy.fs.readFileSync (fs.js:509:33)
    at Object.<anonymous> (E:\dev_workspace\cloud_static\build\svg.js:34:16)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "svg"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! factoring_weixin@1.0.0 svg: `node ./build/svg.js -s ./src/svg -t ./src/icons`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the factoring_weixin@1.0.0 svg script 'node ./build/svg.js -s ./src/svg -t ./src/icons'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the factoring_weixin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./build/svg.js -s ./src/svg -t ./src/icons
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs factoring_weixin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls factoring_weixin
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     E:\dev_workspace\cloud_static\npm-debug.log

package.json:

{
  "name": "factoring_weixin",
  "version": "1.0.0",
  "description": "factoring cloud system for weixin",
  "author": "huilin.liang <huilin.liang@ufscs.com>",
  "private": true,
  "bin": {
    "vsvg": "build/svg.js"
  },
  "scripts": {
    "dev": "node build/dev-server.js",
    "build": "node build/build.js",
    "svg": "node ./build/svg.js -s ./src/svg -t ./src/icons"
  },
  "dependencies": {
    "fastclick": "^1.0.6",
    "fs-plus": "^3.0.1",
    "glob": "^7.1.2",
    "svgo": "^0.7.2",
    "vue": "^2.2.2",
    "vue-router": "^2.2.0",
    "vuex": "^2.1.1",
    "vuex-i18n": "^1.3.1",
    "vux": "^2.2.1",
    "yargs": "^8.0.2"
  },
  "devDependencies": {
    "autoprefixer": "^6.7.2",
    "babel-core": "^6.22.1",
    "babel-loader": "^6.2.10",
    "babel-plugin-transform-runtime": "^6.22.0",
    "babel-preset-env": "^1.2.1",
    "babel-preset-stage-2": "^6.22.0",
    "babel-register": "^6.22.0",
    "chalk": "^1.1.3",
    "compression-webpack-plugin": "^0.3.2",
    "connect-history-api-fallback": "^1.3.0",
    "copy-webpack-plugin": "^4.0.1",
    "css-loader": "^0.26.1",
    "eventsource-polyfill": "^0.9.6",
    "express": "^4.14.1",
    "extract-text-webpack-plugin": "^2.0.0",
    "file-loader": "^0.10.1",
    "friendly-errors-webpack-plugin": "^1.1.3",
    "function-bind": "^1.1.0",
    "html-webpack-plugin": "^2.28.0",
    "http-proxy-middleware": "^0.17.3",
    "less": "^2.7.1",
    "less-loader": "^2.2.3",
    "node-sass": "^4.5.3",
    "opn": "^4.0.2",
    "optimize-css-assets-webpack-plugin": "^1.3.0",
    "ora": "^1.1.0",
    "rimraf": "^2.6.0",
    "sass-loader": "^6.0.6",
    "semver": "^5.3.0",
    "url-loader": "^0.5.7",
    "vconsole": "^2.5.2",
    "vue-awesome": "^2.3.3",
    "vue-loader": "^11.1.4",
    "vue-style-loader": "^2.0.0",
    "vue-svg-icon": "^1.2.9",
    "vue-svgicon": "^1.2.6",
    "vue-template-compiler": "^2.2.4",
    "vux-loader": "^1.0.70",
    "webpack": "^2.2.1",
    "webpack-bundle-analyzer": "^2.2.1",
    "webpack-dev-middleware": "^1.10.0",
    "webpack-hot-middleware": "^2.16.1",
    "webpack-merge": "^2.6.1",
    "yaml-loader": "^0.4.0"
  },
  "engines": {
    "node": ">= 4.0.0",
    "npm": ">= 3.0.0"
  },
  "browserslist": [
    "iOS >= 7",
    "Android >= 4.1"
  ]
}

my project file list:

---build
------svg.js
---src
------icons
------svg
Allenice commented 7 years ago

Sorry, I don't know why you do that way. Please read document.

lianghuilin commented 7 years ago

i know what is going on because i forget copy that 'icon.tpl.txt' file to my project. i'm so sorry!