SimonDegraeve / hapi-webpack-plugin

Webpack middleware for Hapi. Supports HMR.
57 stars 25 forks source link

Compiler Error #4

Closed hydrotik closed 8 years ago

hydrotik commented 8 years ago

Getting a strange error

/PathToProject/node_modules/hapi-webpack-plugin/node_modules/webpack-dev-middleware/middleware.js:32
    var fs = compiler.outputFileSystem = new MemoryFileSystem();
                                       ^

TypeError: Cannot set property 'outputFileSystem' of undefined
    at module.exports (/PathToProject/node_modules/hapi-webpack-plugin/node_modules/webpack-dev-middleware/middleware.js:32:37)
    at Object.register (/PathToProject/node_modules/hapi-webpack-plugin/lib/index.js:53:68)
    at Object.target [as register] (/PathToProject/node_modules/hapi/node_modules/joi/lib/object.js:79:30)
    at Items.serial.self.root._registring (/PathToProject/node_modules/hapi/lib/plugin.js:317:14)
    at iterate (/PathToProject/node_modules/hapi/node_modules/items/lib/index.js:35:13)
    at done (/PathToProject/node_modules/hapi/node_modules/items/lib/index.js:27:25)
    at Object.exports.register (/PathToProject/node_modules/inert/lib/index.js:31:12)
    at Object.target [as register] (/PathToProject/node_modules/hapi/node_modules/joi/lib/object.js:79:30)
    at Items.serial.self.root._registring (/PathToProject/node_modules/hapi/lib/plugin.js:317:14)
    at iterate (/PathToProject/node_modules/hapi/node_modules/items/lib/index.js:35:13)
    at done (/PathToProject/node_modules/hapi/node_modules/items/lib/index.js:27:25)
    at Object.exports.register (/PathToProject/node_modules/vision/lib/index.js:58:12)
    at Object.target [as register] (/PathToProject/node_modules/hapi/node_modules/joi/lib/object.js:79:30)
    at Items.serial.self.root._registring (/PathToProject/node_modules/hapi/lib/plugin.js:317:14)
    at iterate (/PathToProject/node_modules/hapi/node_modules/items/lib/index.js:35:13)
    at Object.exports.serial (/PathToProject/node_modules/hapi/node_modules/items/lib/index.js:38:9)
21 Oct 16:55:04 - [nodemon] app crashed - waiting for file changes before starting...

Running this on:

"dependencies": {
    "breakpoint-sass": "^2.6.1",
    "btns": "^1.1.0",
    "classnames": "^2.2.0",
    "dateformat": "^1.0.11",
    "falcor": "^0.1.13",
    "falcor-hapi": "0.0.2",
    "flux": "^2.1.1",
    "hapi": "^11.0.1",
    "hapi-react": "^3.1.2",
    "hapi-react-views": "^3.1.3",
    "joi": "^6.9.1",
    "lodash": "^3.10.1",
    "mongoose": "^4.1.12",
    "normalize.css": "^3.0.3",
    "object-assign": "^4.0.1",
    "qs": "^5.2.0",
    "react": "^0.13.0",
    "react-picture": "0.0.4",
    "react-slick": "^0.8.1",
    "slick-carousel": "^1.5.8",
    "superagent": "^1.4.0",
    "susy": "^2.2.6",
    "vision": "^3.0.0"
    "autoprefixer": "^6.0.3",
    "babel-core": "^5.8.25",
    "babel-eslint": "^4.1.3",
    "babel-loader": "^5.3.2",
    "babel-plugin-rewire": "^0.1.22",
    "babel-plugin-typecheck": "^1.3.0",
    "babel-runtime": "^5.8.25",
    "command-line-args": "^2.0.2",
    "concurrently": "^0.1.1",
    "css-loader": "^0.20.2",
    "csslint": "^0.10.0",
    "csslint-loader": "^0.2.1",
    "eslint": "^1.7.3",
    "eslint-loader": "^1.1.0",
    "extract-text-webpack-plugin": "^0.8.2",
    "file-loader": "^0.8.4",
    "hapi-cors-headers": "^1.0.0",
    "hapi-webpack-plugin": "^1.1.0",
    "html-loader": "^0.3.0",
    "html-webpack-plugin": "^1.6.2",
    "inert": "^3.1.0",
    "json-loader": "^0.5.3",
    "jsx-loader": "^0.13.2",
    "node-sass": "^3.3.3",
    "nodemon": "^1.7.3",
    "opn": "^3.0.2",
    "postcss-loader": "^0.7.0",
    "react-hot-loader": "^1.3.0",
    "sass-loader": "^3.0.0",
    "style-loader": "^0.13.0",
    "ts-loader": "^0.5.6",
    "typescript": "^1.6.2",
    "webpack": "^1.12.2",
    "webpack-dev-server": "^1.12.1",
    "webpack-error-notification": "^0.1.4"
  }
SimonDegraeve commented 8 years ago

If you still have this issue, can you provide you Webpack config?

hydrotik commented 8 years ago

Ended up removing it and just using hapi-react-views. Thanks!

SimonDegraeve commented 8 years ago

Ok, sorry about the long delay.

hydrotik commented 8 years ago

No problem! I might revisit at some point after tackling a few things

SimonDegraeve commented 8 years ago

Sure, I just updated it to the latest deps. I plan to support Webpack 2 when a stable version will be release.

ljani commented 8 years ago

I think you accidentally passed your webpack instance to directly to options instead of passing it as options: { compiler }. In other words options: {new Webpack(config)} vs. options: {compiler: new Webpack(config)}