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

Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency #84

Closed
1 task done
rkristelijn opened this issue Jul 13, 2021 · 2 comments

Comments

@rkristelijn
Copy link
Contributor

rkristelijn commented Jul 13, 2021

I'm submitting a ... (check one with "x")

  • bug report => search github for a similar issue or PR before submitting

Current behavior

When building, the console throws these warnings:

> ngx-skeleton-loader-demo@2.10.0 build:pkg
> ng build ngx-skeleton-loader --prod

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

Expected behavior

no warnings/errors during build

Reproduction of the problem

run npm run build:pkg

Angular CLI: 9.1.12
Node: 14.17.0
OS: darwin x64
Angular: 9.1.12

What is the motivation / use case for changing the behavior?

The build should run without warnings/errors.

Please tell us about your environment:

Angular CLI: 9.1.12
Node: 14.17.0
OS: darwin x64
Angular: 9.1.12

More information:

npm run build:pkg:trace

> ngx-skeleton-loader-demo@2.10.0 build:pkg:trace
> node --trace-warnings ./node_modules/@angular/cli/bin/ng build ngx-skeleton-loader --prod

Building Angular Package
(node:34972) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:655:11)
    at Object.get (internal/modules/cjs/loader.js:669:5)
    at Boolean.Node [as constructor] (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/node.js:44:23)
    at new Boolean (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/index.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
(node:34972) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:655:11)
    at Object.get (internal/modules/cjs/loader.js:669:5)
    at Boolean.Node [as constructor] (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/node.js:45:23)
    at new Boolean (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/index.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
(node:34972) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:655:11)
    at Object.get (internal/modules/cjs/loader.js:669:5)
    at Boolean.Node [as constructor] (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/node.js:46:25)
    at new Boolean (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/index.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
(node:34972) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:655:11)
    at Object.get (internal/modules/cjs/loader.js:669:5)
    at Boolean.Node [as constructor] (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/node.js:44:23)
    at new Boolean (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/index.js:58:17)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
(node:34972) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:655:11)
    at Object.get (internal/modules/cjs/loader.js:669:5)
    at Boolean.Node [as constructor] (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/node.js:45:23)
    at new Boolean (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/index.js:58:17)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
(node:34972) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:655:11)
    at Object.get (internal/modules/cjs/loader.js:669:5)
    at Boolean.Node [as constructor] (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/node.js:46:25)
    at new Boolean (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/nlrxk0145/github/ngx-skeleton-loader/node_modules/stylus/lib/nodes/index.js:58:17)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)

npm ls stylus       
ngx-skeleton-loader-demo@2.10.0 /Users/nlrxk0145/github/ngx-skeleton-loader
├─┬ @angular-devkit/build-angular@0.901.12
│ ├─┬ stylus-loader@3.0.2
│ │ └── stylus@0.54.7 deduped
│ └── stylus@0.54.7
└─┬ ng-packagr@10.1.1 invalid

It is related to stylus/stylus#2534

@rkristelijn
Copy link
Contributor Author

npm i -D stylus@0.54.8 - fixes this issue when building on node 14

npm i -D stylus@0.54.8                                                                   

added 4 packages, removed 1 package, changed 1 package, and audited 1769 packages in 6s

39 vulnerabilities (4 low, 8 moderate, 24 high, 3 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
➜  ngx-skeleton-loader git:(master) ✗ npm run build:pkg:trace

> ngx-skeleton-loader-demo@2.10.0 build:pkg:trace
> node --trace-warnings ./node_modules/@angular/cli/bin/ng build ngx-skeleton-loader --prod

Building Angular Package

------------------------------------------------------------------------------
Building entry point 'ngx-skeleton-loader'
------------------------------------------------------------------------------
Compiling TypeScript sources through ngc
Bundling to FESM2015
Bundling to UMD
WARNING: No name was provided for external module 'perf-marks/marks' in output.globals – guessing 'marks'
Minifying UMD bundle
Writing package metadata
Built ngx-skeleton-loader

------------------------------------------------------------------------------
Built Angular Package
 - from: /Users/nlrxk0145/github/ngx-skeleton-loader/projects/ngx-skeleton-loader
 - to:   /Users/nlrxk0145/github/ngx-skeleton-loader/dist/ngx-skeleton-loader
------------------------------------------------------------------------------

@willmendesneto
Copy link
Owner

As discussed on the pull request, this is happening because of the NodeJS version and it's not affecting the bundle or any other of the tasks in this project.

Saying that, I'm closing this issue. Thanks @rkristelijn !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants