Within my package.json, I have specified a dependency as "protractor": "2.1.0"
. This particular package is dependent on another package called "jasminewd2": "0.0.5"
.
The behavior of the jasminewd2
package is something that I want to modify. So, I decided to download its source code and make the necessary changes. According to Yarn's documentation, it is possible to use a local source for packages:
will install a package from your local filesystem. This feature comes in handy when you want to experiment with packages that haven't been published to the registry yet.yarn add file:/path/to/local/folder
Upon executing this command,
is added to my package.json."jasminewd2": "file:\\CustomNodeModules\\jasminewd2"
This addition is reflected in my yarn.lock file as well:
"file:\\CustomNodeModules\\jasminewd2", <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d1bbb0a2bcb8bfb4a6b5e391e1ffe1ffe4">[email protected]</a>: name jasminewd2 version "0.0.5" resolved "https://registry.yarnpkg.com/jasminewd2 /-/jasminewd2-0.0.5.tgz#528609a124dfc688c1e3f434a638e047066cd63e"
Despite these changes, the folder node_modules/jasminewd2
still contains the original version sourced from npm. How can I ensure that Yarn installs my modified version instead?