Hello all,
I’m a brand new dev and I’m having a really hard time getting my smart contract to compile. I looked around on the internet for hours and tried every solution I can find (including ones posted in this forum), but to no avail. I was using PowerShell, simply because I know the commands decently well. one solution said using WSL should fix it, it did not. I have tried all the ways to point to where the file is that I can find and nothing is working.
Error:
Error: Could not find /mnt/c/Users/Jordan/Desktop/Real
Website/node_modules/@openzeppelin/contracts/token/ERC20/ERC20Capped.sol from any
sources;
imported from /mnt/c/Users/Jordan/Desktop/Real Website/MoovItTest/contracts/MoovIt.sol
at Resolver.<anonymous>
(/mnt/c/Users/Jordan/AppData/Roaming/npm/node_modules/truffle
/build/webpack:/packages/resolver/
dist/lib/resolver.js:54:1)
at Generator.next (<anonymous>)
at fulfilled
(/mnt/c/Users/Jordan/AppData/Roaming/npm/node_modules/truffle
/build/webpack:/packages/resolver/
dist/lib/resolver.js:5:42)
Truffle v5.1.44 (core: 5.1.44)
Node v10.22.0
Versions:
Truffle v5.1.44 (core: 5.1.44)
Solidity v0.5.16 (solc-js)
Node v10.22.0
Web3.js v1.2.1
Solidity file:
pragma solidity ^0.5.16;
import "../../node_modules/@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "../../node_modules/@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol";
contract MoovItTest is ERC20Capped, ERC20Detailed {
constructor(string _name, string _symbol, uint8 _decimals, uint256 cap)
DetailedERC20(_name, _symbol, _decimals)
ERC20Capped(_cap)
public
{
}
}
Any help would be greatly appreciated.