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': '[email protected]', '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 - 新浪微博中的關注功能是如何設計表結構的?2. angular.js - 關于$apply()3. MySQL數據庫中文亂碼的原因4. dockerfile - [docker build image失敗- npm install]5. angular.js使用$resource服務把數據存入mongodb的問題。6. 如何解決Centos下Docker服務啟動無響應,且輸入docker命令無響應?7. nignx - docker內nginx 80端口被占用8. angular.js - Ionic 集成crosswalk后生成的apk在android4.4.2上安裝失敗???9. android-studio - Android Studio 運行項目的時候一堆警告,跑步起來!?10. 我在centos容器里安裝docker,也就是在容器里安裝容器,報錯了?
