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

WIP Remove shelljs #79

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Conversation

computamike
Copy link

Adding more tests, removing shelljs.

I also made the tests run serially. The reason I thought this would be a good idea because if a test runs in parallel then it might be that one tests execute as another is executing - and the file system is a shared dependency.

A future improvement might be an in-memory file system - potentially allow the tests to execute in parallel.

I've added a coverage report option - run npm run coverage will generate a HTML report in the coverage folder. When I ran this report I noticed that the read function was not covered by a test. I added a sample UTF-8 file and a test. Coverage is now at 100%.

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmitriz
Copy link
Owner

dmitriz commented May 25, 2019

Looks awesome, thanks, will have a look.

@dmitriz
Copy link
Owner

dmitriz commented May 26, 2019

Thanks again!

Seeing you are using async/await that I'm a bit worried about it, see e.g.
https://thecodebarbarian.com/80-20-guide-to-async-await-in-node.js.html

What do you think of instead exporting plain callback style function?
As this is low level library, it might be safer and more open to use in broader context.

@computamike
Copy link
Author

I've only been doing nodejs for a little over a year (i'm a c# guy really) - and when I started the lead programmer who mentored me was a user of async/await - and this has sort of left me reaching for async and await by default.

I've never done callback functions, and if you want I'll have a go a refactoring the code to use callbacks.

leave it with me and I'll try a better version tonight - I'm in the UK, and it's a public holiday tomorrow, so I'll have to try and get it done tonight because I have a feeling that there may be plans for the Monday.

@dmitriz
Copy link
Owner

dmitriz commented May 26, 2019

Yes, you may find Node.js more of wild west than other more established languages. Some years ago promises were the next hot thing, while few years thereafter people realized the design wasn't that convenient, which is how the async/await came up, to make the async code look the same as sync.
However, it wasn't without new problems created unfortunately, as this article points.

While callbacks are simpler and more powerful, especially with arrow functions and currying:
https://github.com/dmitriz/tiny-cps

Let me know in case of any difficulties...

* Some FS commands (exist etc) were asynchronous - replaced these with
Synchronous versions
* Replaced the mkdir with recursive option to ensureDireSync
* Tests pass 100%
Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

test.js Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
Sorry - My IDE had coloured the path reference (for example) as grey -
indicating that it wasn't actually used anymore - but I hadn't spotted
it.

In previous projects I've used a eslinter - deepscan.io provides this
functionality - thankfully - but maybe we could add eslint support?
Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Show resolved Hide resolved
@computamike
Copy link
Author

Hi @dmitriz - I'll fix the hound issues. Sorry I didn't realize that hound was a thing...

@dmitriz
Copy link
Owner

dmitriz commented May 28, 2019

Thanks a lot and apologies for the crazy bot, please ignore it!
I am going to uninstall it from all my packages.

* Moved some of the variable declaration around destination.

Destination doesn't change for each file, therefore no need to define
these every iteration.
Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmitriz
Copy link
Owner

dmitriz commented May 28, 2019

Looks great, is the debugger left in the tests a typo?

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmitriz
Copy link
Owner

dmitriz commented May 28, 2019 via email

Main page for this project suggests that it supports standard - it isn't
installed so installing it.

@dmitriz mentioned in a previous commit :

Eslint and the likes are exactly the tasks I am trying to offload to the
bots :)
That way I don't need to bloat my packages, keeping and  maintaining
more
dependencies can become a pain.
Also Eslint specifically had a high profile security incident and being
that popular is attractive target for hackers.

My thoughts were : Using bots to enforce Standard JS Code standards is
fine - but ensuring that code is 'correct' replies upon me pushing the
code to github, only to then find that it fails code standards.  As the
project shows compliance with Standard, and that standard can be used to
check the code conformance I think that adding in standard would be a
good thing to do - it allows me to check my code before uploading.

If this is a bad idea then this commit can be reverted out - but I find
it useful to know that my code is compliant before pushing.
@computamike
Copy link
Author

In the read file function, the problem with inaccessible file seems that the sync version fs.readFileSync is used. It feels a bit unnatural in Node.js, where we have fs.readFile with callbacks providing the needed control flow, whereas with the sync version you have no way to know when the process is finished, also we want to keep our tests swift and non-blocking.

Hi @dmitriz - In the index.js file the read function exposed there uses fs.readFileSync - This was the reason why I wrote this read method here - similar to the method that the main library exposes. Do you think we should replace that with the async version (with call back support) also?

@dmitriz
Copy link
Owner

dmitriz commented May 28, 2019 via email

@computamike
Copy link
Author

computamike commented May 28, 2019

Hi @dmitriz -

I've had a go at callbacks - and I've really struggled - particularly when comparing the output of one file, with another - using callbacks.

so the tests (currently) look like this :

test('copy one directory preserving file structure', t => {
  mkdir('tmp/dir_old')
  write('tmp/dir_old/file', 'mytext')
  fn('tmp/dir_old', 'tmp/dir_new')
  t.is(read('tmp/dir_new/file'), 'mytext')
})

whereas I think in a callback solution we'd need to do something like this :

test('copy one directory preserving file structure', t => {
  mkdir('tmp/dir_old')
  write('tmp/dir_old/file', 'mytext')
  fn('tmp/dir_old', 'tmp/dir_new')
 
  fs.readFile('tmp/LICENSE', 'utf8', (err, data) => {
    if (err) {
      t.fail('Error reading the file : ' + err)
    }
    t.is(data, 'mytext')
    t.pass()
    t.end()
  })
})

and if you want to compare one file with another then this could be problematic.

@dmitriz dmitriz reopened this May 28, 2019
Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmitriz
Copy link
Owner

dmitriz commented May 28, 2019

It is basically the problem caused by the sync methods.
Both mkdir and write are still sync by now.
But if you look at
https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_fs_writefilesync_file_data_options
the method returns undefined, not a promise.
So you have no way to know when it ends, this is what I mean by the lacking flow control.

E.g. you cannot write

await fs.writeFileSync(...)

The sync methods are meant to imitate the shell methods but they do not wait for the execution, so are not good fit generally for anything advanced.
(Yes, I am guilty using them when I started :)

This is also one of the reasons async/await is fragile,
it is meant to make your code look like sync but does not work with
the most basic Node.js methods.

Callbacks or promises are better in that respect,
so let us use either of them:
https://github.com/jprichardson/node-fs-extra#sync-vs-async-vs-asyncawait

test('copy one directory preserving file structure', t => {
  mkdir('tmp/dir_old')
  write('tmp/dir_old/file', 'mytext')
  ...

Here the mkdir is sync but write is not waiting for it to complete.
You meed to use async version.
I haven't tested it but presume fs.mkdir returns a promise.
Then the following purely "promised" way would guarantee
each subsequent method waiting for the previous:

test('copy one directory preserving file structure', t => {
  fs.mkdir('tmp/dir_old')
    .then(() => fs.write('tmp/dir_old/file', 'mytext'))
    .then(... another function returning promise ... )
  ...

or with callbacks simply

test('copy one directory preserving file structure', t => {
  fs.mkdir('tmp/dir_old', () => {
     fs.write('tmp/dir_old/file', 'mytext'), () => {
        ... anything can go here ...
     }
  }
}
  ...

So comparing with promises, you don't even need to wrap into promise returning functions.
The only downside is the nesting, but this is a tiny library where some moderately ugly nesting could be tolerated for the sake of simplicity :)
And probably more accessible to people from our languages, you'd be better qualified to judge it :)

Of course, for anything advanced this nesting can get in your way, which is why I am working on this: https://github.com/dmitriz/cpsfy

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@codelingo codelingo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dmitriz
Copy link
Owner

dmitriz commented May 29, 2019

Hi, I've read your comments, it is all fine,
as it is your PR, I'd like to give you maximum comfort and freedom,
so if you find having these style checkers helpful and saving time for you,
we can surely import them for now,
and then worry about keeping them or not later after the job is done.

It could be easier to commit stuff unrelated to removing shelljs in separate PRs,
but I leave it to you, whatever you find more convenient.

Basically don't worry about anything, including the bots, their role is advisory - feel free to disregard. The main job is to get rid of the shelljs and keep the main functionality.

@computamike
Copy link
Author

thanks @dmitriz - I'm determined to get callbacks working for you - and I've just managed to get a test working using callbacks - I'm going to fix all the tests to use the same mechanism, and I'll replace any synchronous file system calls I can find - like you identified the appendFile.

Sorry this PR has been so difficult. If you want I'll separate out the essential async + shellJS stuff from anything else I'm doing here (like lint stuff etc)

Repository owner deleted a comment May 29, 2019
@dmitriz
Copy link
Owner

dmitriz commented May 30, 2019 via email

@dmitriz
Copy link
Owner

dmitriz commented Jun 4, 2019

This might be a helpful guide:
https://areknawo.com/node-js-file-system-api-beginner-friendly-guide/

@dmitriz dmitriz changed the title Remove shelljs WIP Remove shelljs Jun 4, 2019
@computamike
Copy link
Author

computamike commented Jun 6, 2019 via email

@dmitriz
Copy link
Owner

dmitriz commented Jun 6, 2019 via email

@Svish
Copy link

Svish commented Oct 26, 2020

Any updates on this?

Just tried to upgrade node from v13 to v14/15, and getting a whole bunch of warnings, which seem to come from shelljs, and only dependency I have which uses that, seems to be gently-copy:

Trace warnings from running a script using `gently-copy`

C:\dev\projects\test> npx cross-env NODE_OPTIONS="--trace-warnings" npm run-script postbuild > crash.log 2>&1

mango-frontend@0.1.0 postbuild C:\dev\projects\test
node scripts/postbuild.js

= Begin copying files

  • Overwriting file or directory: ./src/config/iis/web.config
    cp: copyFileSync: could not write to dest file (code=ENOENT):./build/web.config
    = End copying files

(node:15952) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\cat.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\cd.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\chmod.js:32:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\cp.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\dirs.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\dirs.js:8:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\dirs.js:11:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\echo.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\tempdir.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\pwd.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\exec.js:11:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\ls.js:8:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\find.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\grep.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\head.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\ln.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\mkdir.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\rm.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\mv.js:7:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\sed.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\set.js:3:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\sort.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\tail.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\test.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\to.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\toEnd.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\touch.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\uniq.js:13:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
(node:15952) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\dev\projects\test\node_modules\shelljs\src\common.js:453:12)
at Object. (C:\dev\projects\test\node_modules\shelljs\src\which.js:5:8)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)

Usages of shelljs

C:\dev\projects\opf\mango-frontend> npx cross-env NODE_OPTIONS="--trace-warnings" npm list shelljs > crash.log 2>&1

mango-frontend@0.1.0 C:\dev\projects\opf\mango-frontend
-- gently-copy@3.2.0 -- shelljs@0.8.3

@dmitriz
Copy link
Owner

dmitriz commented Oct 27, 2020

PRs are welcome 🙂

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

Successfully merging this pull request may close these issues.

None yet

4 participants