Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.js v14 Warning: Accessing non-existent property ___ of module exports inside circular dependency #2648

Closed
fishcharlie opened this issue Apr 23, 2020 · 8 comments · Fixed by #2661
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@fishcharlie
Copy link

🐛 Bug Report

On Node.js v14 there are a lot of warnings when using docusaurus v2. These warnings do not occur when running Node.js v13.13.0.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Install Node.js v14.0.0
  2. Run npm start on a docusaurus v2 project (looks like it occurs on npm run build as well, maybe others)

Expected behavior

No warnings or errors to occur in Node.js v14.0.0 (ie. same behavior as Node.js v13.13.0)

Actual Behavior

Lots of warnings displayed (see logs below).

(node:79706) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:79706) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:79706) Warning: Accessing non-existent property 'which' of module exports inside circular dependency

Your Environment

  • Docusaurus version used: ^2.0.0-alpha.50
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Node.js v14.0.0
  • Operating system and version (desktop or mobile): Desktop

Reproducible Demo

  1. Clone https://github.com/dynamoosejs/dynamoose
  2. cd docs
  3. npm install
  4. npm start
@fishcharlie fishcharlie added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Apr 23, 2020
@fishcharlie
Copy link
Author

It looks like this is related to nodejs/node#32987.

@lex111
Copy link
Contributor

lex111 commented Apr 23, 2020

It seems that this is due to one of the dependencies we use. We will wait for patch version shelljs/shelljs#991

@Norcy
Copy link

Norcy commented Apr 23, 2020

Coincidentally, the same question to me. When i change the NodeJs's version to 13.13.0, the problem disappear.

@userqin
Copy link

userqin commented Apr 26, 2020

node -v v14.0.0
npm --v 6.14.4
hexo --v
(node:15335) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:15335) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:15335) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:15335) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:15335) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:15335) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
hexo: 4.2.0
hexo-cli: 3.1.0
os: Darwin 17.7.0 darwin x64
node: 14.0.0
v8: 8.1.307.30-node.30
uv: 1.37.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.16.0
modules: 83
nghttp2: 1.40.0
napi: 6
llhttp: 2.0.4
openssl: 1.1.1f
cldr: 36.1
icu: 66.1
tz: 2019c
unicode: 13.0

I am trying to deploy my blog .md files to git pages. I got the following messages after running hexo d
Can anyone let me know how I can successully deploy to git pages ?
(node:15326) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency (Use node --trace-warnings ...to show where the warning was created) (node:15326) Warning: Accessing non-existent property 'column' of module exports inside circular dependency (node:15326) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency (node:15326) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency (node:15326) Warning: Accessing non-existent property 'column' of module exports inside circular dependency (node:15326) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency INFO Deploying: git INFO Clearing .deploy_git folder... INFO Copying files from public folder... FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html TypeError [ERR_INVALID_ARG_TYPE]: The "mode" argument must be integer. Received an instance of Object at copyFile (fs.js:1890:10) at tryCatcher (/Users/username/blog/node_modules/bluebird/js/release/util.js:16:23) at ret (eval at makeNodePromisifiedEval (/usr/local/lib/node_modules/hexo/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39) at /Users/username/blog/node_modules/hexo-fs/lib/fs.js:144:39 at tryCatcher (/Users/username/blog/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/username/blog/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/Users/username/blog/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/Users/username/blog/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/Users/usernameblog/node_modules/bluebird/js/release/promise.js:729:18) at Promise._fulfill (/Users/username/blog/node_modules/bluebird/js/release/promise.js:673:18) at Promise._resolveCallback (/Users/username/blog/node_modules/bluebird/js/release/promise.js:466:57) at Promise._settlePromiseFromHandler (/Users/username/blog/node_modules/bluebird/js/release/promise.js:559:17) at Promise._settlePromise (/Users/username/blog/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/Users/username/blog/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/Users/username/blog/node_modules/bluebird/js/release/promise.js:729:18) at Promise._fulfill (/Users/username/blog/node_modules/bluebird/js/release/promise.js:673:18) at Promise._resolveCallback

@lex111
Copy link
Contributor

lex111 commented Apr 26, 2020

Docusaurus is not Hexo.

@userqin
Copy link

userqin commented Apr 26, 2020

Docusaurus is not Hexo.

Could you please help fix the following issues ?. Thank you

  • (node:15335) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
  • (Use node --trace-warnings ... to show where the warning was created)
  • (node:15335) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
  • (node:15335) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
  • (node:15335) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
  • (node:15335) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
  • (node:15335) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency

@arieller
Copy link

same here with mongodb -

(node:9736) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:9736) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
(node:9736) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
(node:9736) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency

everything works though...
used the exact same code a month ago and had no warnings like the above

@fishcharlie
Copy link
Author

@userqin @arieller This is the repository for Docusaurus, NOT MongoDB or Hexo. Please create or search on issues on those repositories for support. This is not the correct place to post these questions.


@lex111 Might be worth deleting the comments above since they aren't relevant and off topic, as well as considering locking this thread.

@facebook facebook locked as spam and limited conversation to collaborators Apr 26, 2020
@yangshun yangshun removed the status: needs triage This issue has not been triaged by maintainers label Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants