webpack-dev-server

webpack-dev-server not working Cannot find module '../lib/polyfills'

偶尔善良 提交于 2019-12-09 14:57:30
问题 I moved my project to another computer, ran npm install. Project works fine except webpack-dev-server, it throws error module.js:544 throw err; ^ Error: Cannot find module '../lib/polyfills' at Function.Module._resolveFilename (module.js:542:15) at Function.Module._load (module.js:472:25) at Module.require (module.js:585:17) at require (internal/module.js:11:18) at Object.<anonymous> (/project/node_modules/.bin/webpack-dev-server:6:1) at Module._compile (module.js:641:30) at Object.Module.

Multi-project build and dynamically loading modules with webpack

若如初见. 提交于 2019-12-09 13:11:35
问题 I have a potentially large Angular 2 application which we are going to split into multiple pieces (it can be considered as bundles within the WebPack terminology). Moreover we are going to build and deploy them separately. So that different pieces of the application can be dynamically loaded from the main application (not within the same web application - within multiple running services which can be on different physical hosts). Webpack does bundling pretty fast and good. But as I know from

Webpack not accepting POST requests

a 夏天 提交于 2019-12-09 03:51:34
问题 I'm currently working on an Angular 2 web application which communicates with an API. In the application the user is able to choose a payment option and the API will return the url to the payment service. The problem is that the payment service uses POST to go to the confirmation page which WebPack does not accept (for some reason it only allows GET requests) and we get the following error: Cannot POST /selection/payment-method Does anybody know how we could configure that WebPack allows POST

webpack-dev-server can't find localhost

夙愿已清 提交于 2019-12-09 03:06:52
问题 I'm trying to get started with React using webpack , but keep running into an error when I try to set up webpack-dev-server . I ran npm install webpack-dev-server followed by webpack-dev-server and the command line returns the following: events.js:154 throw er; // Unhandled 'error' event ^ Error: getaddrinfo ENOTFOUND localhost at errnoException (dns.js:26:10) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26) Any clues on what is happening here? I don't really know how webpack

Webpack ERROR in Path must be a string. Received undefined

可紊 提交于 2019-12-08 16:07:43
问题 I'm update my node.js to version 7. And after run webpack in project I received error message: ERROR in Path must be a string. Received undefined My package.json : "dependencies": { "react": "^15.3.1", "react-native": "^0.33.0", "react-redux": "^4.4.5", "react-web": "0.4.5", "redux": "^3.6.0", "redux-thunk": "^2.1.0", "remote-redux-devtools": "^0.4.8" }, "devDependencies": { "babel-core": "^6.18.2", "babel-loader": "^6.2.7", "babel-preset-react-native": "^1.9.0", "babel-preset-stage-1": "^6

What does the lazy mode of webpack dev server do?

倾然丶 夕夏残阳落幕 提交于 2019-12-08 14:46:33
问题 I am running my webpack-dev-server with webpack-dev-server --lazy --inline --progress --colors --port 8082 However this shows a 404 error in my browser when it tries to access bundle.js . Everything else seems fine since if i replace --lazy with --hot , things work fine. What exactly does --lazy do then? Update: Here is the webpack file - module.exports = { devtool: "source-map", entry: [ 'webpack/hot/only-dev-server', // "only" prevents reload on syntax errors "./app/main.js" ], output: {

webpack-dev-server nfs mount file watcher

丶灬走出姿态 提交于 2019-12-08 12:39:39
问题 I have the watching plugin configured, and if I edit files on my VM, it works great. However, I have an NFS share, and I edit my files on the host. The filewatcher on the VM does not pick up changes on the NFS share. For other reasons, I do need this to be an NFS share. Is there any way that I can make this work? The node docs state "You can still use fs.watchFile, which uses stat polling, but it is slower and less reliable." 回答1: I fixed this problem with Ubuntu 14.04 running on Oracle VM

Hyperledger REST Server Angular Web App getting could not connect to REST server outside localhost

ε祈祈猫儿з 提交于 2019-12-08 05:19:05
问题 I'm following the great Hyperledger Composer tutorials here to getting started. I've managed to get everything running, including the REST Server and the Skeleton Angular web app on top of it. Problem arise when I try to use the application outside of localhost. I can access the REST Server on port 3000 and interact with it (adding, removing, uppdating). I can also access the application (port 4200), but when I try to interact with it I get the following: Error: Could not connect to REST

After update to Angular 6 [WDS] Disconnected on IE after load

元气小坏坏 提交于 2019-12-08 03:39:56
问题 I updated my Angular Project from 5 to 6. But now I have issues with the Internet Explorer 11. Every time I try to load the live dev server on localhost:4200 the login page renders but immediatly disconnects from the live dev server. All other Browsers work fine, no errors on the console (tried with Edge, Firefox and Chrome) My pollyfills look like this: /** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. * *

NODE_PATH throws error when NPM starts on windows 10

自作多情 提交于 2019-12-07 17:35:40
问题 I am trying to built a MEAN Todo app by following https://github.com/michaelcheng429/super-mean-stack package.json { "name": "ToDoThoughts", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "start": "NODE_PATH=$NODE_PATH:./app node server", "dev": "npm start & webpack-dev-server --progress --colors" }, "license": "ISC", "dependencies": { "angular": "1.4.12", "angular-ui-router": "0.3.1", "body-parser": "1.15.2", "bootstrap": "3.3.7", "express": "4.14.0" },