Open rkalis opened 5 years ago
Thanks @rkalis!
Thanks both of you! We'll triage this and get it sorted out.
Creating a symlink from the parent node_modules to the repo node_modules seems to be a valid workaround.
Yeah, that works. I learned about the nohoist option in the meantime:
{
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/package-name-here",
"**/package-name-here/**"
]
}
}
Is there any way to specify my plugin directory through truffle.config.js? Usually I just want to write a special plugin for my project, and I don't wanna publish or install it through npm
Iirc you can also specify relative paths for specific plugins if it's a local plugin. Note that you do need to add a "truffle-plugin.json" file in the directory of your local plugin. Perhaps @gnidan can confirm?
Issue
@PaulRBerg raised an issue in truffle-plugin-verify about the plugin not working in Yarn workspaces. The contents of his issue:
Yarn workspaces is this new way of intelligently managing your npm modules in a monorepo by installing them only once (or multiple times if there are overlapping versions). What it does is that it aggregates all the modules at the root of your project.
If I install truffle-plugin-verify in the "contracts" package of this monorepo and I try to run it, I get the following error:
Of course, I moved on and installed the module globally, but I can't use this plugin on CI.
I'm guessing that Truffle searches for installed plugins in the
node_modules
of the directory containingtruffle.js
, while in this case the plugin is installed in the rootnode_modules
of the workspace, several levels higher.Steps to Reproduce
truffle-plugin-verify
) into the Truffle project.truffle plugin run verify Roscoin --network goerli
).Expected Behavior
Acknowledge that the plugin is installed into the root of the project rather than the current directory, and access it from there.
Actual Results
Environment
truffle version
): 5.0.35node --version
): 10.15.3npm --version
): 6.11.3