U
U
Undefined2021-01-01 01:19:38
npm
Undefined, 2021-01-01 01:19:38

How to update a dependency in a dependency?

I have a file-loader in my project (locations in my-project/node_modules/file-loader)
and inside this file-loader there is a loader-utils (locations in file-loader/node_modules/loader-utils)
I need to update the loader -utils from version ^2.0.0 to ^3.2.0
I can't use yarn upgrade [email protected] in file-loader-a directory as neither package.lock.json nor yarn.lock is there
can I somehow force file-loader to use a different version of loader-utils?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aetae, 2021-01-01
@Undefined

You can use yarn resolutions to rewrite dependencies. However, it should be remembered that different major versions (2 and 3 respectively) may have breaking differences in api.

V
Vladimir, 2021-01-01
@Casufi

https://docs.npmjs.com/cli/v8/configuring-npm/pack...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question