Jump to page: 1 24  
Page
Thread overview
DUB is not working correctly
Feb 24, 2021
Maxim
Feb 24, 2021
evilrat
Feb 24, 2021
Maxim
Feb 24, 2021
evilrat
Feb 24, 2021
Maxim
Feb 24, 2021
evilrat
Feb 24, 2021
Maxim
Feb 24, 2021
H. S. Teoh
Feb 24, 2021
Maxim
Feb 24, 2021
Siemargl
Feb 24, 2021
Maxim
Feb 24, 2021
Siemargl
Feb 24, 2021
Maxim
Feb 24, 2021
Siemargl
Feb 24, 2021
Maxim
Feb 24, 2021
Siemargl
Feb 24, 2021
Siemargl
Feb 24, 2021
Maxim
Feb 24, 2021
Maxim
Feb 25, 2021
Maxim
Feb 25, 2021
Siemargl
Feb 25, 2021
Maxim
Feb 24, 2021
Imperatorn
Feb 25, 2021
Maxim
Feb 25, 2021
Maxim
Feb 26, 2021
Siemargl
Feb 26, 2021
Maxim
Feb 26, 2021
ryuukk_
Feb 26, 2021
Maxim
Feb 26, 2021
evilrat
Feb 26, 2021
H. S. Teoh
Feb 26, 2021
Maxim
Feb 26, 2021
Maxim
Feb 26, 2021
Maxim
Feb 26, 2021
Maxim
Feb 25, 2021
user1234
Feb 25, 2021
Maxim
February 24, 2021
Hello, I have problems with working in dub environment. If I try to init my project with 'dub init', all needed files will be created successfully. However, when I run 'dub run', the manager gives me an error:

'Configuration 'application' of package application contains no source files. Please add {"targetType": "none"} to its package description to avoid building it.
Package with target type "none" must have dependencies to build.'

If I set targetType in dub.json to "none", the only message:
 'Package with target type "none" must have dependencies to build.'

will remain. When I set targetName to "app" or any other name, the problem will appear again with the same message above. I flicked through many forums and videos how to correctly install dub, and nothing helped.

I am using dub 1.23.0 built on Sep 25 2020 on Windows 10 x64. Will be very thankful for your help!
February 24, 2021
On Wednesday, 24 February 2021 at 16:13:48 UTC, Maxim wrote:
> Hello, I have problems with working in dub environment. If I try to init my project with 'dub init', all needed files will be created successfully. However, when I run 'dub run', the manager gives me an error:
>
> 'Configuration 'application' of package application contains no source files. Please add {"targetType": "none"} to its package description to avoid building it.
> Package with target type "none" must have dependencies to build.'
>
> If I set targetType in dub.json to "none", the only message:
>  'Package with target type "none" must have dependencies to build.'
>
> will remain. When I set targetName to "app" or any other name, the problem will appear again with the same message above. I flicked through many forums and videos how to correctly install dub, and nothing helped.
>
> I am using dub 1.23.0 built on Sep 25 2020 on Windows 10 x64. Will be very thankful for your help!

Doesn't seem like an installation problem.

Could you post your dub.json contents and describe what you are trying to achieve?

Do you have your source files in 'src' or 'source' folder next to the dub.json file? If not, you need to tell dub to treat any other non conventional folder as source location.
February 24, 2021
On Wednesday, 24 February 2021 at 16:27:49 UTC, evilrat wrote:
> On Wednesday, 24 February 2021 at 16:13:48 UTC, Maxim wrote:
>> Hello, I have problems with working in dub environment. If I try to init my project with 'dub init', all needed files will be created successfully. However, when I run 'dub run', the manager gives me an error:
>>
>> 'Configuration 'application' of package application contains no source files. Please add {"targetType": "none"} to its package description to avoid building it.
>> Package with target type "none" must have dependencies to build.'
>>
>> If I set targetType in dub.json to "none", the only message:
>>  'Package with target type "none" must have dependencies to build.'
>>
>> will remain. When I set targetName to "app" or any other name, the problem will appear again with the same message above. I flicked through many forums and videos how to correctly install dub, and nothing helped.
>>
>> I am using dub 1.23.0 built on Sep 25 2020 on Windows 10 x64. Will be very thankful for your help!
>
> Doesn't seem like an installation problem.
>
> Could you post your dub.json contents and describe what you are trying to achieve?
>
> Do you have your source files in 'src' or 'source' folder next to the dub.json file? If not, you need to tell dub to treat any other non conventional folder as source location.

Sure, here are dub.json contents:
{
	"authors": [
		"Max"
	],
	"copyright": "Copyright © 2021, Max",
	"description": "A minimal D application.",
	"license": "proprietary",
	"dependencies": {
		"dsfml": "~>2.1.1"
	},
	"targetType": "none",
	"targetName": "app",
	"name": "test"
}

I just want to run it by typing 'dub run'. But the error message says that I need to set targetType to none, add targetName and dependencies for it.

I have folder source next to dub.json. I'd better show you my project structure:

test
|  source
|     app.d
|  dub.json
February 24, 2021
On Wednesday, 24 February 2021 at 16:46:20 UTC, Maxim wrote:
>
> Sure, here are dub.json contents:
> {
> 	"authors": [
> 		"Max"
> 	],
> 	"copyright": "Copyright © 2021, Max",
> 	"description": "A minimal D application.",
> 	"license": "proprietary",
> 	"dependencies": {
> 		"dsfml": "~>2.1.1"
> 	},
> 	"targetType": "none",
> 	"targetName": "app",
> 	"name": "test"
> }
>
> I just want to run it by typing 'dub run'. But the error message says that I need to set targetType to none, add targetName and dependencies for it.
>

ok, you don't need targetType in this case, setting it to none means it will do nothing.

the original message likely related to dsmfl which haven't been updated since 2016, maybe you can try another package, for example bindbc-smfl (there is older 'derelict' series, and 'bindbc' series which is newer and recommended over derelict)


https://code.dlang.org/packages/bindbc-sfml

February 24, 2021
On Wednesday, 24 February 2021 at 17:27:19 UTC, evilrat wrote:
> On Wednesday, 24 February 2021 at 16:46:20 UTC, Maxim wrote:
>>
>> Sure, here are dub.json contents:
>> {
>> 	"authors": [
>> 		"Max"
>> 	],
>> 	"copyright": "Copyright © 2021, Max",
>> 	"description": "A minimal D application.",
>> 	"license": "proprietary",
>> 	"dependencies": {
>> 		"dsfml": "~>2.1.1"
>> 	},
>> 	"targetType": "none",
>> 	"targetName": "app",
>> 	"name": "test"
>> }
>>
>> I just want to run it by typing 'dub run'. But the error message says that I need to set targetType to none, add targetName and dependencies for it.
>>
>
> ok, you don't need targetType in this case, setting it to none means it will do nothing.
>
> the original message likely related to dsmfl which haven't been updated since 2016, maybe you can try another package, for example bindbc-smfl (there is older 'derelict' series, and 'bindbc' series which is newer and recommended over derelict)
>
>
> https://code.dlang.org/packages/bindbc-sfml

Unfortunately, I tried bindbc-sfml package but the problem is still existing. I also started a new project and without any changes ran it but the result was the same. Anyway, thank you so much for your help!
February 24, 2021
On Wednesday, 24 February 2021 at 16:13:48 UTC, Maxim wrote:
> Hello, I have problems with working in dub environment. If I try to init my project with 'dub init', all needed files will be created successfully. However, when I run 'dub run', the manager gives me an error:
>
> [...]

Wierd, have never encountered that. I'm also using Win 10 x64.
February 24, 2021
On Wednesday, 24 February 2021 at 17:45:56 UTC, Maxim wrote:
>
> Unfortunately, I tried bindbc-sfml package but the problem is still existing. I also started a new project and without any changes ran it but the result was the same. Anyway, thank you so much for your help!

does it works for an empty project created with 'dub init' from terminal?
February 24, 2021
On Wednesday, 24 February 2021 at 18:21:40 UTC, evilrat wrote:
> On Wednesday, 24 February 2021 at 17:45:56 UTC, Maxim wrote:
>>
>> Unfortunately, I tried bindbc-sfml package but the problem is still existing. I also started a new project and without any changes ran it but the result was the same. Anyway, thank you so much for your help!
>
> does it works for an empty project created with 'dub init' from terminal?

No, it doesn't work on an empty project with 'dub init'.
February 24, 2021
On Wed, Feb 24, 2021 at 06:32:00PM +0000, Maxim via Digitalmars-d-learn wrote:
> On Wednesday, 24 February 2021 at 18:21:40 UTC, evilrat wrote:
> > On Wednesday, 24 February 2021 at 17:45:56 UTC, Maxim wrote:
> > > 
> > > Unfortunately, I tried bindbc-sfml package but the problem is still existing. I also started a new project and without any changes ran it but the result was the same. Anyway, thank you so much for your help!
> > 
> > does it works for an empty project created with 'dub init' from terminal?
> 
> No, it doesn't work on an empty project with 'dub init'.

Sounds like something is wrong with your toolchain installation. An empty project ought to work.  Maybe try a fresh reinstall?


T

-- 
BREAKFAST.COM halted...Cereal Port Not Responding. -- YHL
February 24, 2021
On Wednesday, 24 February 2021 at 18:52:12 UTC, H. S. Teoh wrote:
> On Wed, Feb 24, 2021 at 06:32:00PM +0000, Maxim via Digitalmars-d-learn wrote:
>> On Wednesday, 24 February 2021 at 18:21:40 UTC, evilrat wrote:
>> > On Wednesday, 24 February 2021 at 17:45:56 UTC, Maxim wrote:
>> > > 
>> > > Unfortunately, I tried bindbc-sfml package but the problem is still existing. I also started a new project and without any changes ran it but the result was the same. Anyway, thank you so much for your help!
>> > 
>> > does it works for an empty project created with 'dub init' from terminal?
>> 
>> No, it doesn't work on an empty project with 'dub init'.
>
> Sounds like something is wrong with your toolchain installation. An empty project ought to work.  Maybe try a fresh reinstall?
>
>
> T

I recently tried that. Even compiler was reinstalled. It didn't help.
« First   ‹ Prev
1 2 3 4