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.

Contracts in NPM @org/dep scoped dependencies don't resolve

See original GitHub issue

I have

{
    "solidity.packageDefaultDependenciesContractsDirectory": "",
    "solidity.packageDefaultDependenciesDirectory": "node_modules"
}

in my settings and am trying to import contracts from a scoped package, but am getting an error: Source "@org/dep/contracts/Dependency.sol" not found: File import callback not supported

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:24 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
deluca-mikecommented, Oct 21, 2020

I am getting an error with for import "merkle-trees/libraries/memory/bytes32/standard/merkle-library.sol";

where merkle-trees is in project_root/node_modules

with settings

"solidity.packageDefaultDependenciesContractsDirectory": "",
"solidity.packageDefaultDependenciesDirectory": "",

Obviously I don’t have these set correctly, but its quite unclear how to set these.

Any tips?

1reaction
juanfranblancocommented, Apr 26, 2020

And your imports? you may need to remove the “contracts” from packageDefaultDependenciesContractsDirectory and use “” instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Package is not publishing to npm (not in the npm registry)
Try npm login . In case of npm publish , sometimes misleading message is shown.
Read more >
scope - npm Docs
Scopes can be associated with a separate registry. This allows you to seamlessly use a mix of packages from the primary npm registry...
Read more >
npm packages in the Package Registry - GitLab Docs
If you plan to install a package through the instance level, then you must name your package with a scope. Scoped packages begin...
Read more >
npm Documentation - API Manual
This command resolves all of the packages dependencies on Module B v2.0 ... However, public scoped modules are free and don't require a...
Read more >
5. Add Gradle Plugin with Dependencies - Spring Cloud
If you don't need to modify the classpath (e.g. add a Pact dependency), ... By default, Spring Cloud Contract Verifier is looking for...
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