Errors when dfx build with the Linkedup tutorial

OS: macOS Mojave 10.14.6
Node: v14.15.4
npm: 7.20.0

When I follow this tutorial, everything goes well until the “dfx build” step.

The terminal says"

dfx build
Building canisters…
Building frontend…
The post-build step failed for canister ‘r7inp-6aaaa-aaaaa-aaabq-cai’ with an embedded error: The command ‘“npm” “run” “build”’ failed with exit status ‘exit code: 2’.

linkedup@1.0.0 build

Hash: 376e8d59cb68aaa0cccb
Version: webpack 4.44.1
Hash: 376e8d59cb68aaa0cccb
Time: 3852ms
Built at: 2021/08/07 下午2:28:30
3 assets
Entrypoint main = index.js
[8] (webpack)/buildin/global.js 472 bytes {0} [built]
[13] ./src/linkedup/public/index.css 573 bytes {0} [built]
[14] ./node_modules/css-loader/dist/cjs.js!./src/linkedup/public/index.css 16.2 KiB {0} [built]
[15] ./src/linkedup/public/main.js + 2 modules 10.9 KiB {0} [built]
| ./src/linkedup/public/main.js 7.44 KiB [built]
| ./src/linkedup/public/templates.js 3.11 KiB [built]
| ./src/linkedup/public/utils.js 267 bytes [built]
+ 12 hidden modules

ERROR in ./src/linkedup/public/main.js
Module not found: Error: Can't resolve 'ic:canisters/linkedup' in '/Users/lilfat/Desktop/Github/dfx_test/local/Make_inter-canister_calls/linkedup/src/linkedup/public'
 @ ./src/linkedup/public/main.js 7:0-45 102:32-40 103:31-39 106:37-45 119:29-37 125:14-22 126:14-22 145:27-35 156:34-42 170:24-32 172:20-28 173:20-28 199:16-24 256:10-18

ERROR in ./src/linkedup/public/main.js
Module not found: Error: Can't resolve 'ic:canisters/linkedup_assets' in '/Users/lilfat/Desktop/Github/dfx_test/local/Make_inter-canister_calls/linkedup/src/linkedup/public'
 @ ./src/linkedup/public/main.js 8:0-59 23:0-15



Have someone met this problem before?
Thank you guys!

When I follow this tutorial:
Make inter-canister calls :: Internet Computer
, everything goes well until the “dfx build” step.
(I followed every step including npm install and npm audit fix ).

OS: macOS Mojave 10.14.6
Node: v14.15.4
npm: 7.20.0

It looks like its been a while since there was a commit in the Linkedup example. Maybe you are facing such issue because you are using a more recent version of dfx?

They used v0.6.22 and you are using last one v0.8.0

Since I changed the dfx.json file, so the dfx version should not corrupt this program.
But I do not know the details about the difference between 0.6.22 and 0.8.0, so I am not sure about that.

There were some breaking changes between 0.7.7 and 0.8.0 so I can imagine from 0.6.22 there was some too which might leads to the issue.

But, again, only my guessing.

0.7.7 → 0.8.0

all changelogs

For anyone still trying to build linkedup: stop dfx, uninstall dfx, and then install dfx v0.6.22 before proceeding…

1 Like

I started working on bringing linkedup up to date, and it’s a pain. I think we’re going to scrap the whole tutorial and prioritize a better developer experience in dfx for inter-canister calls, and then we’ll update the tutorial with a new, simpler example


Is there any update on the inter canister query tutorial?

What is the best way to proceed to learn about inter canister query? for instance is there a working example compatible with dfx 0.8.x?

I’m looking for this too. I was previously using LinkedUp as a solid example of how to build a working app on the Internet Computer, but now it’s failing to build (dfx 0.8.4). Is there another example I can refer to when building my app?

I’m specifically looking for an example that includes Internet Identity and username/password login (like LinkedUp did), so @kpeacock’s To-do example isn’t enough.

I haven’t done anything with username / password, but check out GitHub - krpeacock/ic-avatar: Latest iteration of the IC Avatar tutorial application if you haven’t seen it yet


Kyle to the rescue! What a great, simple example of login on the IC!

I’m writing a web app that needs to be accessed in podcast players’ built-in browsers. I was a little worried that the pared-down built-in browsers wouldn’t be able to handle Internet Identity login, so I stuck a link to the app you have hosted on the IC, and to my delight it worked just fine in the players I tested it in. Fantastic!

Has the LinkedUp tutorial been updated?

Would really love to get this app going, but it fails with the same error as mentioned at the beginning of this thread using dfx deploy:

I’m using dfx 0.9.3. I know that it can get running with dfx 0.6.22 but would like to resolve it in 0.9.3 to attempt a mainnet deployment.

Thanks for any help you can offer!