I have created a node.js project, within which I have created a truffle directory and initialised its project. I have installed the openzeppelin (npm install @openzeppelin/contracts) library in this truffle project directory, but nothing appears to have been installed, although I did not received any error during the install process. The import statement in my project displays the error hereafter:
import "@openzeppelin/contracts/token/ERC721/ERC721Full.sol";
Source "@openzeppelin/contracts/token/ERC721/ERC721Full.sol" not found: File import callback not supported
Thank you. J
Best Answer
If you run
npm uninstall @openzeppelin/contracts
and thennpm install @openzeppelin/contracts@2.3.0
, then retry the import, then it should work.Also, check your truffle-config.js file and see if the root directory is configured properly to find your
node_modules
folder properly.