question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot mkdir in a snapshot. Try mountpoints instead.

See original GitHub issue

What version of pkg are you using?

5.6.0

What version of Node.js are you using?

v16.15.0

What operating system are you using?

Windows 10

What CPU architecture are you using?

x86_64

What Node versions, OSs and CPU architectures are you building for?

default

Describe the Bug

i am compiling “macaca-cli” repository, and it is compiling successfully into exe. but when i run the application it gives me this error

pkg/prelude/bootstrap.js:1833
      throw error;
      ^

Error: Cannot mkdir in a snapshot. Try mountpoints instead.
    at mkdirFailInSnapshot (pkg/prelude/bootstrap.js:1593:7)
    at Object.mkdirSync (pkg/prelude/bootstrap.js:1605:12)
    at Object.sync [as mkdir] (C:\snapshot\macaca-cli-master\node_modules\mkdirp\index.js:74:13)
    at Logger._init (C:\snapshot\macaca-cli-master\node_modules\xlogger\lib\xlogger.js:44:5)
    at new Logger (C:\snapshot\macaca-cli-master\node_modules\xlogger\lib\xlogger.js:40:8)
    at Object.<anonymous> (C:\snapshot\macaca-cli-master\node_modules\xlogger\lib\xlogger.js:172:18)
    at Module._compile (pkg/prelude/bootstrap.js:1887:22)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)

Expected Behavior

It should run the compiled app

To Reproduce

just compile “macaca-cli” repository and run it.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
robertsLandocommented, May 23, 2022

BTW the error IMO is here:

\node_modules\xlogger\lib\xlogger.js:44:5

I think this xlogger module by default stores the log or else in a directory inside node_modules folder

https://github.com/xudafeng/xlogger/blob/master/lib/xlogger.js#L44

Seems it’s configurable with options so maybe a patch isn’t needed here.

1reaction
robertsLandocommented, May 23, 2022

you should write a patch for npm-update

See example here

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot mkdir in a snapshot. Try mount points instead.
I solved this problem by using process.cwd() to get your pkg execute path, which you can use this to create new dir. Because...
Read more >
Docker tries to mkdir the folder that I mount
The problem was that by default the CryFS-mounted virtual directory is not accessible by root , but Docker runs as root . The...
Read more >
Mount successful, Directory accessible, but cannot do ...
I was able to mount the folder, but cannot do file operations. ... Note: if i am using sudo mkdir it is allowing...
Read more >
Cannot mount /.snapshots to @snapshots
I am trying to get my Snapper Snapshot layout as per Arch Wiki. I have now deleted the original /.snapshots folder, created a...
Read more >
Can't seem to mount a snapshot
Can't seem to mount a snapshot. I'm running the latest Mojave. I create a snapshot with: $ tmutil localsnapshot Created local snapshot with ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found