dub import local D package

data pulverizer data.pulverizer at gmail.com
Wed Apr 20 23:39:03 UTC 2022


Hi all,

I'm trying to import a local dub package into a dub project 
(`json` format). I have added the package I'm trying to import 
with `dub add-local` and `dub add-path` and including it within 
the json file, but I get the error

```
$ dub build
Performing "debug" build using /.../ldc2/bin/ldc2 for x86_64.
myPackageName 0.1.0: target for configuration "library" is up to 
date.
test ~master: building configuration "application"...
source/app.d(1,8): Error: module `mymodule` is in file 
'myPackageName/modules/mymodule.d' which cannot be read
import path[0] = source/
import path[1] = ../myPackageName/source/
import path[2] = /.../ldc2/bin/../import
/.../ldc2/bin/ldc2 failed with exit code 1.
```

The dependencies in the dub.json file looks like this:


```
	"dependencies": {
		"myPackageName": {
			"path": "/.../myPackageName",
			"version": "0.1.0"
		}
	}
```

Thanks in advance


More information about the Digitalmars-d-learn mailing list