contracts-upgradeable/proxy/Initializable.sol not found

Hi I am trying to run the upgrade examples of the documentation and after installing the openzeppeling upgrade contract I am having this error:

ParserError: Source "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol" not found
--> project:/contracts/MonitoringCenter.sol:5:1:

The file is on node_modules/@openzeppeling folder

:1234: Code to reproduce

import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";

:computer: Environment

I am using ubuntu 20.04 and
npx truffle version
Truffle v5.4.10 (core: 5.4.10)
Solidity - 0.8.4 (solc-js)
Node v16.9.1
Web3.js v1.5.2

package.json
{
....
"devDependencies": {
"@openzeppelin/contracts": "^4.3.1",
"@openzeppelin/contracts-upgradeable": "^4.3.2",
"@openzeppelin/test-helpers": "^0.5.13",
"@openzeppelin/truffle-upgrades": "^1.9.1",
"chai": "^4.3.4",
"truffle": "^5.4.10"
}
}

Truffle

1 Like

Hi, welcome! :wave:

A little weird, nothing seems to be wrong, maybe you can remove the modules file and then `have a try.

the problem was a documentation error that I believe it was corrected. The lib is really at:
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

2 Likes