flow icon indicating copy to clipboard operation
flow copied to clipboard

Local setup of documentation doesn't work

Open devbugging opened this issue 3 years ago • 5 comments

Problem

I've tried following the guide for the local setup of documentation and it doesn't work. First I tried setting up everything locally on my M1 arm CPU and the error is:

"gatsby-plugin-mdx" threw an error while running the onCreateNode lifecycle:

dlopen(/Users/dapper/Dev/flow/docs/node_modules/oniguruma/build/Release/onig_scanner.node, 0x0001): tried:
'/Users/dapper/Dev/flow/docs/node_modules/oniguruma/build/Release/onig_scanner.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')),
'/usr/local/lib/onig_scanner.node' (no such file), '/usr/lib/onig_scanner.node' (no such file)



  Error: dlopen(/Users/dapper/Dev/flow/docs/node_modules/oniguruma/build/Release/onig_scanner.node, 0x0001): tried: '/Users/dapper/Dev/flow/docs/node_modules/oniguruma/build/Release/oni
  g_scanner.node' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/onig_scanner.node' (no such file), '/usr/lib/onig_scanner.node' (no 
  such file)

So obviously it has problems with the ARM (which is concerning on its own since more and more devs will have M1s), but it's also broken for x86, because I went ahead and setup an ubuntu server where I tried to setup the docs so I could deploy changes over git (so much work btw) and it still doesn't work. The error on x86 is:

/var/www/flow/docs/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Channel closed
    at new NodeError (node:internal/errors:371:5)
    at ChildProcess.send (node:internal/child_process:739:16)
    at WorkerPool.doWork (/var/www/flow/docs/node_modules/gatsby-worker/dist/index.js:239:23)
    at WorkerPool.scheduleWork (/var/www/flow/docs/node_modules/gatsby-worker/dist/index.js:254:12)
    at WorkerPool.renderHTML [as scheduleWorkSingle] (/var/www/flow/docs/node_modules/gatsby-worker/dist/index.js:263:17)
    at /var/www/flow/docs/node_modules/gatsby/src/commands/build-html.ts:232:38
    at tryCatcher (/var/www/flow/docs/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/var/www/flow/docs/node_modules/bluebird/js/release/map.js:68:38)
    at MappingPromiseArray.<anonymous> (/var/www/flow/docs/node_modules/bluebird/js/release/promise_array.js:115:31)
    at MappingPromiseArray.init (/var/www/flow/docs/node_modules/bluebird/js/release/promise_array.js:79:10)
    at MappingPromiseArray._asyncInit (/var/www/flow/docs/node_modules/bluebird/js/release/map.js:37:10)
    at _drainQueueStep (/var/www/flow/docs/node_modules/bluebird/js/release/async.js:97:12)
    at _drainQueue (/var/www/flow/docs/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/var/www/flow/docs/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.<anonymous> (/var/www/flow/docs/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (node:internal/timers:466:21)
Emitted 'error' event on ChildProcess instance at:
    at node:internal/child_process:743:35

Steps to Reproduce

Setup local docs from scratch.

Acceptance Criteria

It should work and be simple.

Context

Today I've spent hours on getting the docs to work and I should spend them making the docs. I really feel this process needs to be polished and improved, else docs will just keep getting worse.

devbugging avatar Feb 03 '22 13:02 devbugging

@sideninja What version of Node is installed on both systems?

10thfloor avatar Feb 03 '22 17:02 10thfloor

@sideninja What version of Node is installed on both systems?

Latest. For the x86 it might have been cpu resources issue (running in cloud you never know). For arm is quite broken tho.

devbugging avatar Feb 03 '22 20:02 devbugging

It's an issue with one of the dependencies. I'll see if we can remove or update it.

10thfloor avatar Feb 07 '22 16:02 10thfloor

@sideninja I am unable to reproduce this error.

10thfloor avatar Feb 09 '22 01:02 10thfloor

but do you have an M1?

devbugging avatar Feb 14 '22 15:02 devbugging