# DocstringParsingError: Documentation tag @custom:oz-upgrades-unsafe-allow not valid for contracts

**URL:** <https://forum.openzeppelin.com/t/docstringparsingerror-documentation-tag-custom-oz-upgrades-unsafe-allow-not-valid-for-contracts/8038>\
**Category:** Support\
**Created:** [May 10, 2021, 1:45am UTC](https://forum.openzeppelin.com/t/docstringparsingerror-documentation-tag-custom-oz-upgrades-unsafe-allow-not-valid-for-contracts/8038 "2021-05-10T01:45:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![reapz](https://avatars.discourse-cdn.com/v4/letter/r/5daacb/32.png) [@reapz](https://forum.openzeppelin.com/u/reapz)\
**Post date:** [May 10, 2021, 1:45am UTC](https://forum.openzeppelin.com/t/docstringparsingerror-documentation-tag-custom-oz-upgrades-unsafe-allow-not-valid-for-contracts/8038/1 "2021-05-10T01:45:42Z")

</div>

I’ve implemented the tutorial on UUPS proxies ([link](https://forum.openzeppelin.com/t/uups-proxies-tutorial-solidity-javascript/7786/1)) but my code won’t compile due to the following error:

```
DocstringParsingError: Documentation tag @custom:oz-upgrades-unsafe-allow not valid for contracts.
  --> @openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:10:1:
   |
10 | /**
   | ^ (Relevant source part starts here and spans across multiple lines).

Error HH600: Compilation failed

```

My package.json dependencies:

```
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@openzeppelin/contracts-upgradeable": "^4.1.0",
"@openzeppelin/hardhat-upgrades": "^1.7.0",
"ethers": "^5.1.4",
"hardhat": "^2.2.1"

```

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [May 10, 2021, 2:32am UTC](https://forum.openzeppelin.com/t/docstringparsingerror-documentation-tag-custom-oz-upgrades-unsafe-allow-not-valid-for-contracts/8038/2 "2021-05-10T02:32:10Z")

</div>

Hi, welcome! 👋

Could you please share the full code?

---

<div class="post-metadata">

**Author:** ![reapz](https://avatars.discourse-cdn.com/v4/letter/r/5daacb/32.png) [@reapz](https://forum.openzeppelin.com/u/reapz)\
**Post date:** [May 10, 2021, 8:09am UTC](https://forum.openzeppelin.com/t/docstringparsingerror-documentation-tag-custom-oz-upgrades-unsafe-allow-not-valid-for-contracts/8038/3 "2021-05-10T08:09:38Z")

</div>

Thankyou, long time lurker 🙂

Yep, its just the code from the tutorial

```
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

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

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

import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";

contract MyTokenV1 is Initializable, ERC20Upgradeable, UUPSUpgradeable, OwnableUpgradeable {

    function initialize() initializer public {

      __ERC20_init("MyToken", "MTK");

      _mint(msg.sender, 1000 * 10 ** decimals());

    }

    function _authorizeUpgrade(address) internal override onlyOwner {}

}

```

Test

```
const MyTokenV1 = await ethers.getContractFactory('MyTokenV1');
await upgrades.deployProxy(MyTokenV1, { kind: 'uups' });
```

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [May 10, 2021, 1:25pm UTC](https://forum.openzeppelin.com/t/docstringparsingerror-documentation-tag-custom-oz-upgrades-unsafe-allow-not-valid-for-contracts/8038/4 "2021-05-10T13:25:27Z")

</div>

Hi @reapz, sorry you ran into this problem! I assume you’re on Windows.

Please use Solidity 0.8.3 or newer.

There is a problem with the 0.8.2 build of Solidity for Windows.

> <https://github.com/ethereum/solidity/issues/11358>
>
> I reported this in the chat but I want to leave it here because there may be som…ething wrong in the build pipeline or release process that should probably be looked into.
> 
> The Windows build for 0.8.2 doesn't seem to support \`@custom\` NatSpec tags. Later builds (0.8.3, 0.8.4) do not have this problem.
> 
> !\[\](https://user-images.githubusercontent.com/481465/117513931-214c2f80-af69-11eb-91d3-7bf4fc73c213.png)
> 
> Reproduction: https://github.com/frangio/solidity-0.8.2-windows

---

<div class="post-metadata">

**Author:** ![reapz](https://avatars.discourse-cdn.com/v4/letter/r/5daacb/32.png) [@reapz](https://forum.openzeppelin.com/u/reapz)\
**Post date:** [May 10, 2021, 1:31pm UTC](https://forum.openzeppelin.com/t/docstringparsingerror-documentation-tag-custom-oz-upgrades-unsafe-allow-not-valid-for-contracts/8038/5 "2021-05-10T13:31:15Z")

</div>

Cool that fixed it, thanks 🙂

I am on Windows. Hopefully this helps other people if anyone gets this error message, no solutions were coming up when I was searching.

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [May 10, 2021, 1:34pm UTC](https://forum.openzeppelin.com/t/docstringparsingerror-documentation-tag-custom-oz-upgrades-unsafe-allow-not-valid-for-contracts/8038/6 "2021-05-10T13:34:07Z")

</div>

Yes, thank you for asking! I’ve also updated the tutorial to recommend using 0.8.3.

---

<div class="post-metadata">

**Author:** ![Surya\_M\_S](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/surya_m_s/32/15532_2.png) [@Surya\_M\_S](https://forum.openzeppelin.com/u/Surya_M_S)\
**Post date:** [June 29, 2022, 2:36am UTC](https://forum.openzeppelin.com/t/docstringparsingerror-documentation-tag-custom-oz-upgrades-unsafe-allow-not-valid-for-contracts/8038/7 "2022-06-29T02:36:08Z")

</div>

Thank you. It solved the error
