I don't know what's going on, I tried to upgrade to docusaurus 1.6.0/1.6.1 and now I'm getting Error: Cannot find module '../../website/siteConfig.js' when running npm run start. Tried several ways (remove node_modules) and also several OS (macOS, Windows) without luck.
Sure
(Write your steps here:)
git clone https://github.com/ory/docs.gitcd docsgit checkout whynpm inpm run startKeep in mind that this works if you downgrade to docusaurus 1.5.1.
The server should start
$ npm run start
> @ start /Users/aeneas/workspaces/js/docs/website
> docusaurus-start
internal/modules/cjs/loader.js:605
throw err;
^
Error: Cannot find module '../../website/siteConfig.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.require (/Users/aeneas/workspaces/js/docs/website/node_modules/docusaurus/lib/server/utils.js:12:20)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Module._compile (/Users/aeneas/workspaces/js/docs/website/node_modules/pirates/lib/index.js:83:24)
at Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Object.newLoader [as .js] (/Users/aeneas/workspaces/js/docs/website/node_modules/pirates/lib/index.js:88:7)
at Module.load (internal/modules/cjs/loader.js:620:32)
If you checkout master, it will work. Here's the diff: https://github.com/ory/docs/pull/83 . I'm sorry if this sounds frustrated, but I really am. Have been trying to get this to work so hard but with every patch there is something new that doesn't work - and I'm unable to publish an important release because I can't get the docs to work properly :(
By the way, 1.6.0 is working normally.
Hi, I am having the same issue and fixed it by changing the path in: node_modules\docusaurus\lib\server\utils.js
const siteConfig = require('../../../../siteConfig.js')
I am curious on two fronts here:
If you are finding that you are getting errors after your upgrade, try to either clear your Babel cache (usually it's in a temporary directory or run the Docusaurus server (e.g., yarn start) with the BABEL_DISABLE_CACHE=1 environment configuration.
or
node_modules directory and yarn install from scratch again?No this is not a babel issue, it's just that someone (specifically: https://github.com/facebook/Docusaurus/blame/master/v1/lib/server/utils.js#L15 ) assumed that the path is ../../website/siteConfig.js (which might be true in development mode) but it's not when you're coming out of node_modules. It does not matter if this is yarn or npm.
The proposed fix works for me @davidbudnick

^ This broke it
I think it would be a good idea to have a test that uses docusaurus as a library as opposed to development mode - a e2e test. That would have probably found a lot of issues regarding the versioning, subcategory, and this one here.
@aeneasr Are you making a pull request for the issue?
I am fixing it now.
Awesome, thank you! If you can, it would be really great if you could release a hotfix patch for that too! :)
I am really sorry for the inconveniences caused. This is partly my mistake. I overlooked the hardcoded path on PR #1114. We will try our best to prevent such cases in the future.
Thank you very much for reporting, and commenting !

Don’t worry about it. Thank you for the amazingly fast response time, not common in OSS! :)
On 7. Dec 2018, at 19:26, Endilie Yacop Sucipto notifications@github.com wrote:
I am really sorry for the inconveniences caused. This is partly my mistake. I overlooked the hardcoded path on PR #1114. We will try our best to prevent such cases in the future.
Thank you very much for reporting, and commenting !
P.S I just deprecated Docusaurus v1.6.1 on NPM, please upgrade to v1.6.2
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Most helpful comment
I am really sorry for the inconveniences caused. This is partly my mistake. I overlooked the hardcoded path on PR #1114. We will try our best to prevent such cases in the future.
Thank you very much for reporting, and commenting !
P.S I just deprecated Docusaurus v1.6.1 on NPM, please upgrade to v1.6.2