When using the Truffle Framework to import a solidity contract, a "File not found" error is produced in the editor.
Apparent Cause:
This appears to be due to the fact that the root directory for the import statement in truffle is "/node_modules" (relative to the "contracts" folder, the path becomes "../node_modules"). However, the problem does not go away when "../node_modules/" is appended to the front of the path.
Specific Example:
In this truffle tutorial, importing Open Zeppelin. In "contracts/TutorialToken.sol":
When using the Truffle Framework to import a solidity contract, a "File not found" error is produced in the editor.
Apparent Cause:
This appears to be due to the fact that the root directory for the import statement in truffle is "/node_modules" (relative to the "contracts" folder, the path becomes "../node_modules"). However, the problem does not go away when "../node_modules/" is appended to the front of the path.
Specific Example:
In this truffle tutorial, importing Open Zeppelin. In "contracts/TutorialToken.sol":
The error appears on the second line, and reads:
Possible solution:
Enable the linter to check the "node_modules" directory in the project root for imported files.