Unable to start discourse from source while running "bin/ember-cli -u"

I am trying to install Discourse on Ubuntu, and while running bin/ember-cli -u, the following errors are occurring,

warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
patch-package 8.0.0
Applying patches...
@ember/test-helpers@2.9.4 ✔
babel-plugin-debug-macros@0.3.4 ✔
content-tag@1.2.2 ✔
ember-cli@5.0.0 ✔
ember-this-fallback@0.4.0 (1 deprecation-name) ✔
ember-this-fallback@0.4.0 (2 themes) ✔
virtual-dom@2.1.1 ✔
Ember CLI running on PID: 28775
I, [2024-01-09T12:16:20.169085 #28806]  INFO -- : Refreshing Gem list
Starting CSS change watcher
I, [2024-01-09T12:16:22.567391 #28806]  INFO -- : listening on addr=127.0.0.1:3000 fd=24
Deprecation notice: `SiteSetting.min_trust_to_create_tag` has been deprecated. Please use `SiteSetting.create_tag_allowed_groups` instead. (removal in Discourse 3.3) 
At /home/aximsoft-ilamathin/discourse/lib/guardian/tag_guardian.rb:12:in `can_create_tag?`
Proxying to http://127.0.0.1:3000
- building... 
I, [2024-01-09T12:16:24.045355 #28806]  INFO -- : starting 1 supervised sidekiqs
I, [2024-01-09T12:16:24.073312 #28806]  INFO -- : master process ready
Loading Sidekiq in process id 28929
I, [2024-01-09T12:16:24.195961 #28930]  INFO -- : worker=0 ready
I, [2024-01-09T12:16:24.210706 #28936]  INFO -- : worker=2 ready
I, [2024-01-09T12:16:24.219471 #28933]  INFO -- : worker=1 ready
undefined:1
{"type":"job","id":0,"error":null,"result":{"result":[{"buffer":true,"string":true},{"data":{"version":3,"names":["w","window","d","define","esc","require","_embroiderRouteBundles_","names","load"],"sources":["/....
SyntaxError: Unexpected token  in JSON at position 219260
    at JSON.parse (<anonymous>)
    at /home/aximsoft-ilamathin/discourse/app/assets/javascripts/node_modules/thread-loader/dist/WorkerPool.js:144:30
    at Socket.onChunk (/home/aximsoft-ilamathin/discourse/app/assets/javascripts/node_modules/thread-loader/dist/readBuffer.js:40:9)
    at Socket.emit (node:events:517:28)
    at addChunk (node:internal/streams/readable:335:12)
    at readableAddChunk (node:internal/streams/readable:308:9)
    at Readable.push (node:internal/streams/readable:245:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

Node.js v18.18.0
[bin/ember-cli] ember-cli process stopped. Terminating unicorn.
I, [2024-01-09T12:16:29.807626 #28806]  INFO -- : reaped #<Process::Status: pid 28930 exit 0> worker=0
I, [2024-01-09T12:16:29.807784 #28806]  INFO -- : reaped #<Process::Status: pid 28933 exit 0> worker=1
I, [2024-01-09T12:16:29.807859 #28806]  INFO -- : reaped #<Process::Status: pid 28936 exit 0> worker=2
I, [2024-01-09T12:16:29.807937 #28806]  INFO -- : master complete

Can you try clearing your node_modules folder and running yarn again to install the dependencies? Also, if you have multiple node versions installed, you could try with a more recent version. (Locally, I have node v21.2.0 and building the app works.)

1 Like

Thank you so much! @pmusaraj

1 Like

i had the same issue running node v20.5.1, upraded it to v21.2.0 resolved the issue :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.