node.js - npm run dev報錯
問題描述
請問各位高手這是神馬情況?
問題解答
回答1:我也遇到過,用cnpm 解決的
回答2:看一下你的package.json厘米有沒有配置scripts。舉個我實際用的例子。https://github.com/anchengjia...
{ 'name': 'blog-fe', 'version': '2.1.0', 'description': '用vue重構整個博客', 'main': 'src/app.js', 'scripts': { 'dev': 'webpack-dev-server --hot --devtool --config ./config/app.webpack.config.js --content-base ./ --host 0.0.0.0 --inline', 'deploy': 'webpack -p --config ./config/app.webpack.config.js', 'libs': 'webpack --config ./config/libs.webpack.config.js -p', 'list': 'node ./config/list.js', 'test': 'node test' }, 'author': 'anchengjian@gmail.com', 'license': 'ISC', 'dependencies': { 'highlight.js': '^9.5.0', 'marked': '^0.3.5', 'vue': '^1.0.25', 'vue-router': '^0.7.13', 'whatwg-fetch': '^1.0.0' }, 'devDependencies': { 'autoprefixer-loader': '^3.2.0', 'babel-core': '^6.7.6', 'babel-eslint': '^6.0.4', 'babel-loader': '^6.2.4', 'babel-plugin-transform-runtime': '^6.15.0', 'babel-preset-es2015': '^6.6.0', 'babel-preset-stage-2': '^6.17.0', 'css-loader': '^0.23.1', 'eslint': '^2.10.2', 'eslint-loader': '^1.3.0', 'extract-text-webpack-plugin': '^1.0.1', 'file-loader': '^0.8.5', 'html-webpack-plugin': '^2.16.0', 'node-sass': '^3.4.2', 'raw-loader': '^0.5.1', 'sass-loader': '^3.2.0', 'style-loader': '^0.13.1', 'url-loader': '^0.5.7', 'vue-hot-reload-api': '^1.3.2', 'vue-html-loader': '^1.2.2', 'vue-loader': '^8.5.2', 'vue-style-loader': '^1.0.0', 'webpack': '^1.13.0', 'webpack-dev-server': '^1.14.1' }}
相關文章:
1. MySQL 使用 group by 之后然后 IFNULL(COUNT(*),0) 為什么還是會獲得 null2. wordpress里,這樣的目錄列表是屬于小工具還是啥?3. 一直報這個錯誤4. 常量在外面不加引號會報錯。5. python如何設置一個隨著系統時間變化的動態變量?6. mysql - 大部分數據沒有行溢出的text字段是否需要拆表7. mysql federated引擎無法開啟8. sublime text3安裝package control失敗9. 我的怎么不顯示啊,話說有沒有QQ群什么的10. mysql 為什么主鍵 id 和 pid 都市索引, id > 10 走索引 time > 10 不走索引?
