# Error when I use the function distribute(array) from the libray DistributedArrays

**URL:** <https://discourse.julialang.org/t/error-when-i-use-the-function-distribute-array-from-the-libray-distributedarrays/16015>\
**Category:** Julia at Scale\
**Tags:** array, distributed\
**Created:** [October 8, 2018, 10:38am UTC](https://discourse.julialang.org/t/error-when-i-use-the-function-distribute-array-from-the-libray-distributedarrays/16015 "2018-10-08T10:38:11Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jsbryan4](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jsbryan4/32/34173_2.png) [@jsbryan4](https://discourse.julialang.org/u/jsbryan4)\
**Post date:** [April 7, 2022, 9:57pm UTC](https://discourse.julialang.org/t/error-when-i-use-the-function-distribute-array-from-the-libray-distributedarrays/16015/4 "2022-04-07T21:57:05Z")

</div>

According to [this post](https://discourse.julialang.org/t/distributed-computing-not-found-package-error/34851) the issue is that the processes are likely added after the “@everywhere using …” commands. I found that by reorganizing my import statements I could make this error go away. Specifically make sure you addprocs first like

```julia
using Distributed
addprocs(4)
@everywhere using DistributedArrays
import("myfile.jl")

```

---

_[View the full topic](https://discourse.julialang.org/t/error-when-i-use-the-function-distribute-array-from-the-libray-distributedarrays/16015)._
