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.

Lack of compile method when used with webpack

See original GitHub issue

I’m using dustjs-linkedin v. 2.7.2 with webpack. When I’m importing dust:

import * as Dust from 'dustjs-linkedin';

or

const Dust = require('dustjs-linkedin');

the imported object doesn’t have compile method.

l_avenir

Is it something webpack specific ?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:7

github_iconTop GitHub Comments

3reactions
Olgagrcommented, Apr 5, 2017

After some more searching, I’m not the only one that have this problem with dustjs and webpack: http://stackoverflow.com/questions/37592861/dustjs-with-webpack-dont-load-all-files

I also tried to import index.js:

const dust = require('dustjs-linkedin/index.js')

but it gives errors:

Module not found: Error: Can't resolve 'dust.core' in '/Users/apple/Documents/my_projects/repos_arranger_client/node_modules/dustjs-linkedin/lib'
 @ ./~/dustjs-linkedin/lib/parser.js 4:4-6:6
 @ ./~/dustjs-linkedin/index.js
 @ ./src/app/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./index.js

ERROR in ./~/dustjs-linkedin/lib/compiler.js
Module not found: Error: Can't resolve 'dust.core' in '/Users/apple/Documents/my_projects/repos_arranger_client/node_modules/dustjs-linkedin/lib'
 @ ./~/dustjs-linkedin/lib/compiler.js 3:4-5:6
 @ ./~/dustjs-linkedin/index.js
 @ ./src/app/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./index.js

ERROR in ./~/dustjs-linkedin/lib/compiler.js
Module not found: Error: Can't resolve 'dust.parse' in '/Users/apple/Documents/my_projects/repos_arranger_client/node_modules/dustjs-linkedin/lib'
 @ ./~/dustjs-linkedin/lib/compiler.js 3:4-5:6
 @ ./~/dustjs-linkedin/index.js
 @ ./src/app/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./index.js

I’ve also checked version 2.7.5. The same story. The only file that seems to be imported is lib/dust.js 😦

0reactions
amalbroscommented, Mar 8, 2021

@rkrishn Did you get the solution?I am also stuck on the same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Would Webpack Stop Re-compiling? (The Quest for ...
We were experiencing an issue where Webpack would mysteriously stop re-compiling and provide no error messaging.
Read more >
I can't compile a react app because of lack of webpack and ...
I'm trying to compile a react app made by other person, after making a npm i I had the following errors
Read more >
Compiler Hooks | webpack
The Compiler module is the main engine that creates a compilation instance with all the options passed through the CLI or Node API....
Read more >
Meteor with Webpack in 2018 — Faster compilation and better ...
Webpack is a great bundler to compile your code including view templates, assets and the all stuff on your application. However, Meteor already...
Read more >
Migrating to SWC: A brief overview - LogRocket Blog
SWC is faster than webpack and Babel. If you've already bootstrapped your project with those tools, here's how you can to SWC tooling....
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