2016-06-14 49 views
0

我使用的是aurelia webpack/es2016導航版本大約兩個月前的骨骼。一切運行良好,但今天,我刪除了我的node_modules目錄,並做了一個新鮮的npm install和我的前端不再運行,並在控制檯中我得到的錯誤我上面提到的:cannot find module './aurelia-framework'更新到最新版本的aurelia後,該項目無法運行,我得到:「can not find module」./aurelia-framework'「from webpack

這裏是我的情況下的package.json上下文幫助所有:

{ 
    "name": "my-project-name", 
    "version": "4.0.0", 
    "sasslintConfig": "./.sass-lint.yml", 
    "description": "Aurelia Front End Web App", 
    "main": "index.js", 
    "scripts": { 
    "dev": "webpack-dev-server -d --config webpack.config.js --hot --inline --progress --devtool source-map --host 0.0.0.0", 
    "a": "webpack-dev-server -d --config webpack.andrew.config.js --hot --inline --progress --devtool source-map", 
    "build": "webpack --config webpack.config.js --progress --profile", 
    "prod": "webpack -p --config webpack.prod.config.js --progress", 
    "test": "karma start", 
    "webdriver:update": "./node_modules/.bin/webdriver-manager update", 
    "webdriver:start": "./node_modules/.bin/webdriver-manager start", 
    "pree2e": "npm run webdriver:update -- --standalone", 
    "e2e": "./node_modules/.bin/protractor", 
    "eslint": "eslint -c .eslintrc.json src" 
    }, 
    "dependencies": { 
    "aurelia-bootstrapper-webpack": "^1.0.0-beta.1.0.0", 
    "aurelia-event-aggregator": "^1.0.0-beta.1.2.0", 
    "aurelia-fetch-client": "^1.0.0-beta.1.2.5", 
    "aurelia-framework": "^1.0.0-beta.1.2.5", 
    "aurelia-history-browser": "^1.0.0-beta.1.1.2", 
    "aurelia-i18n": "^0.5.3", 
    "aurelia-logging-console": "^1.0.0-beta.1.1.4", 
    "aurelia-notification": "^1.0.0-rc1", 
    "aurelia-pal-browser": "^1.0.0-beta.1.1.4", 
    "aurelia-polyfills": "^1.0.0-beta.1.0.0", 
    "aurelia-router": "^1.0.0-beta.1.1.1", 
    "aurelia-templating-binding": "^1.0.0-beta.1.1.1", 
    "aurelia-templating-resources": "^1.0.0-beta.1.1.1", 
    "aurelia-templating-router": "^1.0.0-beta.1.1.1", 
    "babel-polyfill": "^6.9.0", 
    "bluebird": "^3.3.4", 
    "bootstrap": "^4.0.0-alpha.2", 
    "exports-loader": "^0.6.3", 
    "font-awesome": "^4.5.0", 
    "humane-js": "^3.2.2", 
    "imports-loader": "^0.6.5", 
    "isomorphic-fetch": "^2.2.1", 
    "jquery": "^2.2.3", 
    "json-loader": "^0.5.4", 
    "node-sass": "^3.6.0", 
    "oidc-client": "^1.0.0", 
    "rome": "^2.1.22", 
    "sass-loader": "^3.2.0", 
    "tether": "^1.3.2", 
    "tether-drop": "^1.4.2", 
    "timezones.json": "^1.1.0", 
    "whatwg-fetch": "^1.0.0" 
    }, 
    "devDependencies": { 
    "aurelia-tools": "^0.1.18", 
    "aurelia-webpack-plugin": "^1.0.0-beta.1.0.0", 
    "autoprefixer": "^6.3.6", 
    "babel-core": "^6.7.2", 
    "babel-eslint": "^6.0.4", 
    "babel-loader": "^6.2.4", 
    "babel-plugin-transform-decorators-legacy": "^1.3.4", 
    "babel-plugin-transform-regenerator": "^6.9.0", 
    "babel-preset-es2015": "^6.6.0", 
    "babel-preset-es2015-loose": "^7.0.0", 
    "babel-preset-stage-0": "^6.5.0", 
    "browser-sync": "^2.12.5", 
    "browser-sync-webpack-plugin": "^1.0.1", 
    "css-loader": "^0.23.1", 
    "eonasdan-bootstrap-datetimepicker": "^4.15.35", 
    "eslint": "^2.9.0", 
    "eslint-config-airbnb": "^8.0.0", 
    "eslint-loader": "^1.3.0", 
    "eslint-plugin-import": "^1.6.1", 
    "eslint-plugin-jsx-a11y": "^1.0.4", 
    "eslint-plugin-react": "^5.0.1", 
    "extract-text-webpack-plugin": "^1.0.1", 
    "file-loader": "^0.8.5", 
    "html-loader": "^0.4.3", 
    "html-webpack-plugin": "^2.9.0", 
    "istanbul": "^0.4.3", 
    "istanbul-instrumenter-loader": "^0.2.0", 
    "jasmine-core": "^2.4.1", 
    "karma": "^0.13.21", 
    "karma-babel-preprocessor": "^6.0.1", 
    "karma-chrome-launcher": "^0.2.2", 
    "karma-coverage": "^0.5.5", 
    "karma-jasmine": "^0.3.7", 
    "karma-webpack": "^1.7.0", 
    "node-sass": "^3.4.2", 
    "postcss-loader": "^0.9.1", 
    "precss": "^1.4.0", 
    "protractor": "^3.2.1", 
    "raw-loader": "^0.5.1", 
    "sass-lint": "^1.7.0", 
    "sass-loader": "^3.2.0", 
    "style-loader": "^0.13.0", 
    "url-loader": "^0.5.7", 
    "wallaby-webpack": "0.0.21", 
    "webpack": "^1.13.0", 
    "webpack-dev-server": "^1.14.1" 
    } 
} 

回答

2

我相信有東西在最新的奧裏利亞-的WebPack-插件打破。作爲臨時解決方案,請降級aurelia-webpack-plugin版本。要做到這一點,在你的package.json,改變奧裏利亞-的WebPack-插件線:

"aurelia-webpack-plugin": "1.0.0-beta.1.0.4" 

運行npm install

你可以找到關於這個問題在這裏https://github.com/aurelia/webpack-plugin/issues/30

更多細節
相關問題