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.

docs say vue, axios, and lodash are peer dependencies, but they are not

See original GitHub issue

in package.json, we have

"dependencies": {
        "axios": "^0.18.0",
        "date-fns": "^2.0.0-alpha.25",
        "lodash": "^4.17.11",
        "validator": "^10.9.0",
        "vue": "2.5.17"
},

Should these not be peerDependencies ? There is something going on with npm and/or yarn that I don’t quite understand. I have a project using vue-mc, and in that project’s node_modules/vue-mc/ folder, there is another node_modules folder that contains vue. This strangely enough makes vue.runtime.esm get included in my project’s built files twice, once from the project itself and once from vue-mc. However if I just delete node_modules/vue-mc/node_modules things work as I’d expect.

What my build looks like in current state - note the doubling-up on vue.runtime.esm: current_state This is 330.30 KiB parsed size.

What happens if I delete vue from vue-mc’s internal node_modules folder: no_double_vue 269.54 KiB parsed size.

_Excerpted from original post by @djsmedes in https://github.com/FiguredLimited/vue-mc/issues/89#issuecomment-468865217_

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
djsmedescommented, Aug 16, 2019

Apologies for not getting to this. I think there might still be problems around this area - as an example, I’m doing this in my main app -

import axios from "axios";
// ...
axios.defaults.xsrfCookieName = "csrftoken";
axios.defaults.xsrfHeaderName = "X-CSRFToken";

But if I’m running from vue-mc locally and it has its own axios install, then Model.save() & co. will use that axios instance, which doesn’t have those csrf settings, and my backend will reject it.

Anyway I will open a new issue when I have time to experiment a bit. Obviously running from a local install is not the actual success criterion for the package. Thanks for looking in on this!

0reactions
albertpratomocommented, Mar 16, 2020

But if I’m running from vue-mc locally and it has its own axios install, then Model.save() & co. will use that axios instance, which doesn’t have those csrf settings, and my backend will reject it.

Just ran into the exact situation here ☝️ . Totally agree that at least Vue and Axios should be made peer dependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warnings about unmet peer dependencies with Yarn
Given the following package.json , I see warnings when running yarn install : warning " > @vue/cli-plugin-eslint@4.5.13" has incorrect peer ...
Read more >
Understanding Peer Dependencies in JavaScript
When to use peerDependencies? Peer dependencies really come into play when you're developing code that will be used by others, such as plugins ......
Read more >
pnpm unmet peer dependencies - You.com | The Search Engine ...
UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more modules specified in the package.json file is not met. Check...
Read more >
Uninstalling packages and dependencies - npm Docs
This uninstalls a package, completely removing everything npm installed on its behalf. It also removes the package from the dependencies, devDependencies, ...
Read more >
Fixing security vulnerabilities in npm dependencies in less ...
When I saw it, I had no clue either but with some research I could fix this. Problem: github security vulernability bot alert....
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