after 3 steps above : i got these file in <project_root_folder>/.dfx/ic/canisters/backend/
service.did
service.did.d.ts
service.did.js
index.js
the index.js file describe:
import { Actor, HttpAgent } from "@dfinity/agent";
// Imports and re-exports candid interface
import { idlFactory } from './backend.did.js';
export { idlFactory } from './backend.did.js';
//...
Which is expect backend.did file
But i generate service.did file .
I am like an ape in Space Odyseey
Got no clue how to generate the right expected did file name .
btwl@btwl-virtual-machine ~/D/i/tax_lint (master)> dfx generate
Generating type declarations for canister backend:
src/declarations/backend/backend.did.d.ts
src/declarations/backend/backend.did.js
backend/backend.did
Generating type declarations for canister assets:
src/declarations/assets/assets.did.d.ts
src/declarations/assets/assets.did.js
src/declarations/assets/assets.did
this is the expected name of did files.
but when i executing dfx deploy backend --network ic i still got file like these :
in <project_root_folder>/.dfx/ic/canisters/backend/
service.did
service.did.d.ts
service.did.js
index.js
The files in .dfx are dfx-internal copies and are at times not very logical. In this case someone probably simply defined that using service for all the files was a fine choice at some point in time. I recommend you donโt mess with anything in .dfx as files in there get modified, overwritten, or discarded at sometimes unpredictable times