-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack build issues with 1.4.1 #933
Comments
+1 |
I recommend for now:
until we figure out a better fix |
Reason is probably that the published package on npm contains a |
Browserify build fails too. Forcing usage of 1.4.0 fixes the issue. |
I accidentally published that file. I was experimenting with moving away from browserify. |
|
Note to self: should explicitly set |
Still having the same issues with 1.4.3. Adding:
Helps though. |
Still broken. |
I just use version "~1.3.7" instead of "^1.3.7" in my packages for now. |
Moved this from server to this socket.io-client thread. Was running 1.3.7 and used npm to update socket.io-client to 1.4.3. The app uses just the socket.io-client to connect to a game server(also updated to socket.io 1.4.3). Developing on windows 7. Tried uninstalling via npm and reinstalling. Did not expect to see warnings and errors from socket.io-client and engine.io-client when starting the app. Shouldn't the missing modules be part of the npm package? Warnings:
Errors:
|
@ADumaine Did you have any issues with 1.3.7? If not just keep using it until this here is solved. |
@levino No 1.3.7 was not having any issues. 1.4.3 actually works. It connects to the server and passes data, but I am still developing locally and not using things like tls. I'll leave it at 1.4.3 for now and test any updates or revert if there are none and we are ready to stage. |
We're publishing a more permanent fix today! |
Great. |
until these problems are resolved: * webpack/webpack-dev-server#356 (comment) * socketio/socket.io-client#933 (comment)
1.4.4 Fixes this for me. Thanks! |
1.4.4 fixed it for me too!. Used npm with @latest. Restarted server and there were no warnings or errors. |
still an issue for me, i've updated to a latest socket.io-client, ws and webpack, and get the following
|
@mrvini what are the steps to reproduce please? I have the following with socket.io-client@1.4.4:
@globexdesigns @ADumaine ❤️ |
@darrachequesne, I have the following setup I have my local module that using sails.io.js and socket.io-client libraries when I run webpack .bundle.js, everything looks good, however when I try run it as webpack dev server, it throws the error I mentioned above |
@mrvini I'm sorry, it seems I am unable to reproduce:
Am I missing something here? |
Oh! It seems Hence the issue. |
This seems vaguely related to request/request/issues/1529 |
Also getting this with both the |
Same, getting this error using |
Socket.IO: 1.7.3 |
@zweifisch, include json loader in your config to solve your problem. Still I have "WARNING in ./~/engine.io/lib/server.js Critical dependency: the request of a dependency is an expression" and other similar to ones from people above. I use Angular2. Maybe config will help:
|
Warnings disappeared when I included
instead of
Still, I have behavior as in #1088. Minimal app with bug is in that issue thread. Edit: Solved my issue. It wasn't because of socket.io. |
@metamaker Thanks so much 👍 |
I am getting following error with later socket.io and webpack 2
var clientVersion = require('socket.io-client/package.json').version; webpack.config.js let path = require('path');
const { GlobCopyWebpackPlugin } = require('@angular/cli/plugins/webpack');
module.exports = {
devtool: false,
resolve: {
modules: [
'node_modules',
path.resolve(__dirname, 'src')
],
extensions: ['.ts', '.js'],
alias: {
// FIXME: Module not found: Error: Can't resolve 'socket.io-client/package' in '/Developer/Work/iot/hub/server2/node_modules/socket.io/lib'
// "socket.io-client/package": "empty-module",
"hiredis": "empty-module",
}
},
target: 'node',
resolveLoader: {
modules: [
'node_modules'
]
},
entry: {
main: './src/index',
vendor: [
'nest.js',
'rxjs'
]
},
output: {
path: path.resolve(__dirname, './dist/build'),
filename: '[name].server.bundle.js',
chunkFilename: "[id].server.chunk.js"
},
module: {
rules: [
{ test: /\.ts$/, use: 'ts-loader' },
{ test: /\.json$/, loader: 'json-loader' },
{ test: /\.html$/, loader: 'raw-loader' },
{ test: /\.(eot|svg)$/, loader: 'file-loader?name=[name].[hash:20].[ext]' },
{ test: /\.js.map/, loader: 'raw-loader' },
]
},
"plugins": [
new GlobCopyWebpackPlugin({
"patterns": [
"config",
"data"
],
"globOptions": {
"cwd": "./",
"dot": true,
"ignore": "**/.gitkeep"
}
}),
]
}; |
Please see the example here: https://github.com/socketio/socket.io/tree/master/examples/webpack-build The right syntax should be Also, the Hope that helps! If not, please reopen an issue with an example reproducing the problem, thanks! |
when I'm trying to import with
TS is telling me that the module has no default export |
@crebuh |
nope it is not working I already had types in version 1.4.29 and upgraded the socket.io-client from 1.7.3 to 2.0.3, still the same problem. maybe my tsconfig.json is wrong, any ideas? |
@crebuh I should have read more carefully! |
I am seeing this issue with webpack ^2.0.0 and no socket.io in package. When I run karma I am getting this. Not sure where to go from here ITO debugging. |
adding socket.io-client to dependencies in my package.json fixed the problem for me |
I had the similar, issue when i made checkout of existing project. " Can't resolve 'engine.io-client' " Was fixed by installing socket.io-client. npm i socket.io-client |
With 1.4.1 I am seeing the following issue from Webpack. My code has no issues with 1.4.0
The text was updated successfully, but these errors were encountered: