New node building and the node not appear im workflow

Hey @Waqas_Shaukat,

That looks like there is an error in the code and something is being used that is not correctly defined.

Hey @Jon we are not adding anything from myself the all code is example that provide from n8n in documentation.

Hey @Waqas_Shaukat

Assuming you did the npm install first it should be working fine, can you share the code you are using so we can give it a quick test?

Here is the link from where we copy the code.

Hey @Jon
Are you here?

Hey @Waqas_Shaukat,

I am here…

Did you run the install command before running the build? Are you also only seeing this on Windows?

Hey @Jon
yes I do that

Hi @Jon and @MutedJam
here is my complete workaround how we develop and test our node.
firstly i follow the all step that mentioned in documentation.
i complete the all step and remove all error and bugs.
here is the screenshot of my all running command and their results.


first they give me timeout error or network connectivity issue but i resolve this by npm mirror registry.

when we run build command we build node successfully there is no error and bugs available in node code.

After build the link command also run successfully. and then we change the path according to documentation into .n8n installation.


After linking Node when i run start command we face the same issue.

why this happen we are worried that i follow all the same step according to documentation and also complete all step. there is no error in code there is no error comes from any other command that we run during the process but when i run finally command and want to start our node they give me this type of shit error. we are not add any piece of code from myself all code and method according to documentation. if the officially documentation not working fine then how a developer can build a new node for his own service and also for community use.
if you have any other support medium/channel kindly tell me. support on google video call voice call and any other. we get n8n subscription for developing node but we are still not able to do any thing and we pay for subscription every month.
kingly its my request help me in this issue if you can.

Thanks

Hey @Waqas_Shaukat,

I believe the issue you are seeing there is down to an issue with the AWS-SDK package, I have seen a lot of reports of it failing from Windows but I have not yet seen a fix. I will see if I can do some digging into the AWS-SDK repo and see if they have fixed it yet.

Hey @Jon
i resolved all the error and bugs


Now my node build successfuly without any error.

there is no error on compiling and running the node everything is working fine but when i open the browser we could not found the node that i build.

2 day ago i try nasapics example and that node appear in browser but now that is also not appear in action.

Hey @Waqas_Shaukat,

You don’t need to run npm 1 in the custom folder but it looks like doing that has removed a package so you added it with npm link then in the next command removed it.

Hey @Jon
Thanks for help.
Now i face a new issue.
according to credentials file structure and documentation we can get GUI Node Input parameter by
‘api_key’: ‘={{$credentials.apiKey}}’


in my code i do same but we can not able to get username and Api Key value and the authorization give me 401 error that means wrong credentials even i enter the correct one.

can you please see and resolve my this problem.

Hey @Waqas_Shaukat,

I would try using a different test url so you can see what the data is that you are sending, Looking quickly at your code I suspect you could be missing a space between Basic and the base64 encoded data, It also looks like you might be encoding the wrong values as well.

I would probably use the below which should take care of it for you.

authenticate: IAuthenticateGeneric = {
  type: 'generic',
  properties: {
    auth: {
      username: '={{$credentials.username}}',
      password: '={{$credentials.apikey}}',
    },
  },
};

Hey @Jon,
you mean using this will automatically add “Basic” and also convert the username and Apikey into base64 string ?

Hey @Waqas_Shaukat,

That is my understanding.

Hey @Jon
Thank you it is working for me.

1 Like

Hi @Jon
I want to show some data in option parameter of node which comes from external API. How can we make API call in option parameter using credentials.

Hey @Waqas_Shaukat,

In our nodes we tend to use loadOptions you can find an example of this in a few different nodes, If you are using the preferred declarative node style I would check out the OpenAI node which uses this for models and includes options to show how you can filter it.

Hey @Jon
i used loadOptions but we getting some error.
{
displayName: ‘Country Name or ID’,
name: ‘country’,
type: ‘options’,
description: ‘Choose from the list, or specify an ID using an’,
noDataExpression: true,
options: ,
default: ‘’,
typeOptions: {
loadOptionsMethod: ‘country’,
},
displayOptions: {
show: {
operation: [‘send’],
resource: [‘fax’],
},
},
},
//function
async country(this: ILoadOptionsFunctions): Promise<any> {
const returnData: any = ;

	const optionsForCountries: OptionsWithUri = {
		headers: {
			Accept: 'application/json',
		},
		method: 'GET',
		uri: 'https://rest.clicksend.com/v3/countries',
		json: true,
	};

	const countriesResponse = await this.helpers.request(optionsForCountries);
	console.log(countriesResponse);
	for (const country of countriesResponse.data) {
		returnData.push({
			name: country.value,
			value: country.code,
		});
	}

	return returnData;
}

here is my code.
and this error :Issues:

There was a problem loading the parameter options from server: “Node type does not have method defined”

Where have you put the country function is it under the nodes methods?