question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello!

I found simular closed issue from 2015 year. Hope something changed during last year. As you may know webpack throws many errors when trying to build autobahn.

As written hire https://bugs.jqueryui.com/ticket/15015 jQueryUI won’t work with browserify and works fine with webpack. So we are waiting for autobahn|js-webpack release.

var webpack= require('webpack');

module.exports = {
    entry: './src/app.js',
    output: {
        path: './bin',
        filename: 'app.bundle.js'
    },
    module: {
        loaders: [
            {
                test: /\.json$/,
                loader: 'json-loader'
            }
        ]
    }
};

Hash: 5409c01a396108dec34a Version: webpack 1.13.1 Time: 4548ms Asset Size Chunks Chunk Names app.bundle.js 1.2 MB 0 [emitted] main [0] ./src/app.js 82 bytes {0} [built] + 187 hidden modules

WARNING in ./~/bindings/bindings.js Critical dependencies: 76:22-40 the request of a dependency is an expression 76:43-53 the request of a dependency is an expression @ ./~/bindings/bindings.js 76:22-40 76:43-53

WARNING in ./~/bindings/README.md Module parse failed: /home/alexey2baranov/htdocs/kp-client/node_modules/bindings/README.md Unexpected token (2:3) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected token (2:3) at Parser.pp$4.raise (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:2221:15) at Parser.pp.unexpected (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:603:10) at Parser.pp$3.parseExprAtom (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:1822:12) at Parser.pp$3.parseExprSubscripts (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:1715:21) at Parser.pp$3.parseMaybeUnary (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:1692:19) at Parser.pp$3.parseExprOp (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:1656:43) at Parser.pp$3.parseExprOp (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:1658:21) at Parser.pp$3.parseExprOps (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:1639:17) at Parser.pp$3.parseMaybeConditional (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:1620:21) at Parser.pp$3.parseMaybeAssign (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:1597:21) at Parser.pp$3.parseExpression (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:1573:21) at Parser.pp$1.parseStatement (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:727:47) at Parser.pp$1.parseTopLevel (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:638:25) at Parser.parse (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:516:17) at Object.parse (/home/alexey2baranov/htdocs/kp-client/node_modules/acorn/dist/acorn.js:3098:39) at Parser.parse (/home/alexey2baranov/htdocs/kp-client/node_modules/webpack/lib/Parser.js:902:15) at DependenciesBlock.<anonymous> (/home/alexey2baranov/htdocs/kp-client/node_modules/webpack/lib/NormalModule.js:104:16) at DependenciesBlock.onModuleBuild (/home/alexey2baranov/htdocs/kp-client/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10) at nextLoader (/home/alexey2baranov/htdocs/kp-client/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25) at /home/alexey2baranov/htdocs/kp-client/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5 at Storage.finished (/home/alexey2baranov/htdocs/kp-client/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16) at /home/alexey2baranov/htdocs/kp-client/node_modules/graceful-fs/graceful-fs.js:78:16 at FSReqWrap.readFileAfterClose as oncomplete @ ./~/bindings ^./.*$

ERROR in ./~/ws/lib/WebSocketServer.js Module not found: Error: Cannot resolve module ‘tls’ in /home/alexey2baranov/htdocs/kp-client/node_modules/ws/lib @ ./~/ws/lib/WebSocketServer.js 15:10-24

ERROR in ./~/options/lib/options.js Module not found: Error: Cannot resolve module ‘fs’ in /home/alexey2baranov/htdocs/kp-client/node_modules/options/lib @ ./~/options/lib/options.js 6:9-22

ERROR in ./~/bindings/bindings.js Module not found: Error: Cannot resolve module ‘fs’ in /home/alexey2baranov/htdocs/kp-client/node_modules/bindings @ ./~/bindings/bindings.js 6:9-22

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

9reactions
glorthocommented, Nov 14, 2016

In case it helps anyone, we spent many hours trying to get autobahn to work with webpack, and this is what worked for our particular case:

$ npm i json-loader

relevant parts of webpack.config.js:

loaders: [{ test: /\.json$/, loader: 'json-loader' }],
externals: ['bindings'],
node: {
  fs: 'empty',
  tls: 'empty'
}
1reaction
Jichaocommented, Aug 19, 2016

You could ignore these warnings, your app.bundle.js has generated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Importing autobahn with webpack & babel - Stack Overflow
I am trying to import the library "autobahn" in my project using babel and webpack. I can import the minified/compiled web version of...
Read more >
autobahn-browser - npm
[BROWSER BUILD] An implementation of The Web Application Messaging Protocol (WAMP).. Latest version: 22.11.1, last published: a month ago.
Read more >
JavaScript packages index - popularity: limited - Page 272
... autobahn2use · autobahn-browser · autobahnjs · autobahn-js-built · autobahnreact ... auto-catch-loader · auto-cdk · auto-cdnify · autocdn-webpack-plugin ...
Read more >
Authoring Libraries | webpack
The following guide is meant for library authors looking to streamline their bundling strategy. Authoring a Library. Let's assume that we are writing...
Read more >
Buble NPM - npm.io
... -jsxasterjs@farrrr/laravel-elixir-webpack-officialdelta-design-system-web@ ... -bubleaxe-markdown-loaderawaveautobahn-corebleak-detectorbone-act-buble ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found