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.

Some of dependencies are removed from headless package.json, but still required

See original GitHub issue

At https://github.com/conversejs/converse.js/commit/3f7ffd025a98ffb5deb4709c2f4bb25139d3ddbc#diff-8d8848d744f09155a6ed06111726618c some of dependencies have been removed, but they are still required.

For instance jed is not in the package.json anymore, but it is required in https://github.com/conversejs/converse.js/blob/master/src/headless/i18n.js which is required in https://github.com/conversejs/converse.js/blob/master/src/headless/converse-core.js. Therefore the only way to use @converse/headless is to manually add dependencies like jed to your local dependencies.

We should either remove the depending code from @converse/headless or add the dependencies to package.json back again.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jcbrandcommented, Mar 15, 2019

Hi @kevinfaguiar,

thanks for your detailed response and for your patience in trying to use the headless build.

You’re right, we need to have a distribution build of converse-headless.js to be used by 3rd party projects.

I’ve now made the relevant changes (see here) so that there is a file dist/converse-headless.js inside @converse/headless and the main key of the package.json points to it.

I’ve also created a quick and dirty headless-example which uses @converse/headless and which you can look at.

Because these changes are not released yet, you’ll need to clone this repo and then npm link in @converse/headless so that you can have the latest code in your project. The headless-example README explains how you can do this.

I’m also closing this issue because I’ve now added Jed as a dependency, which is what this was about. Feel free to create new issues if you run into any problems.

Good luck and let me know how it goes!

1reaction
jcbrandcommented, Mar 14, 2019

@kevinfaguiar: backbone, es6-promise, moment, pluggable.js are all set as dependencies in the package.json of @converse/headless.

See here: https://github.com/conversejs/converse.js/blob/master/src/headless/package.json#L25

jQuery is not a dependency of @converse/headless and is not used, so I don’t know why you think it’s a missing dependency.

Concerning the snabdom errors, that’s because you need webpack aliases. See here: https://github.com/conversejs/converse.js/blob/master/webpack.config.js#L91

We should probably document that somewhere, or make a fix so that those aliases are no longer necessary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find expected browser chrome locally - Stack Overflow
Reading up online, tried removing "puppeteer-core": "^10.0.0" from package.json dependencies for no avail. Any help is much appriciated. Thanks
Read more >
npm just deleted my all files from node_modules #19450
npm should not delete by itself files when installing new module. just install a new module.
Read more >
Uninstalling packages and dependencies - npm Docs
To remove a package from your node_modules directory, on the command line, use the uninstall command. Include the scope if the package is...
Read more >
Introduction | Cypress Documentation
In your package.json scripts, pass the command to boot your server, the url your ... cypress/base container with all of the required dependencies...
Read more >
Why you should prefer using pnpm over npm and yarn? | refine
Here are some of the basic commands: pnpm init : Create a package.json file; pnpm install : Download all the packages listed as...
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