Cannot install/use node.js in sbie

Please post your problem description here

Moderator: Barb@Invincea

Post Reply
fzm67054
Posts: 4
Joined: Thu Nov 02, 2017 4:02 am

Cannot install/use node.js in sbie

Post by fzm67054 » Thu Nov 02, 2017 10:08 am

Hi,

:!: Sorry, the following discuss I guess you had experience in npm.

I try to install node.js in a sandbox.
The installing has no problem, and "npm init" runs fine.
But I can't run "npm install XXX" (XXX= gulp or ...), it's get: Unhandled rejection Error: ENOENT: no such file or directory, stat 'C:\Users\...

I guess it like installing Chrome, so I install node.js outside sandbox.
It's work fine when outside sandbox, but fail inside sandbox.
I have no idea about this problem!
Is anyone can help me to solve this problem?

My OS:
Windows 10 pro, 1709.
node.js: 8.9.0
sandboxie: 5.22


MERGED POST -
"It's work fine when outside sandbox, but fail inside sandbox." means:
* Installed node.js ouside SBIE
* run cmd outside SBIE > "npm install XXX" ==> success
* run cmd inside SBIE > "npm install XXX" ===> fail

fzm67054
Posts: 4
Joined: Thu Nov 02, 2017 4:02 am

Re: Cannot install/use node.js in sbie

Post by fzm67054 » Fri Nov 03, 2017 1:00 pm

If you would like to reproduce this problem, follow steps:
1. Download node.js: https://nodejs.org/en/download/
2. Install node.js(maybe runs in a sandbox first).
3. Run cmd.exe
4. Type 'npm --version' to check the installing is fine.
5. Type 'npm init'
6. Type 'npm install gulp'

If you passed the upper steps, please report here.
Thank you:D

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2337
Joined: Mon Nov 07, 2016 3:10 pm

Re: Cannot install/use node.js in sbie

Post by Barb@Invincea » Fri Nov 03, 2017 4:20 pm

Hello fzm67054,

Try npm -g install gulp from an admin node.js sandboxed console. If that fails, not sure if there's anything else to try.
As for installing node.js inside Sandboxie, I was able to install it, but I am not sure it will work properly.
I tested installing node.js outside Sandboxie, and then running it Sandboxed to perform the npm gulp install.

Regards,
Barb.-

fzm67054
Posts: 4
Joined: Thu Nov 02, 2017 4:02 am

Re: Cannot install/use node.js in sbie

Post by fzm67054 » Sun Nov 05, 2017 12:10 am

Thanks to Barb,

Because I already installed gulp outside, the situation may not same as yours.
I try to create a new sandbox, then just run cmd of windows in the sandbox.
Almost failed:
* npm install -g gulp
* npm install -g react
* npm install -g browsersync
>> All fail mssages start with: Unhandled rejection Error: ENOENT: no such file or directory, stat 'C:\Users...'

But this is a success:
* npm install -g bower

This bothers me even more...

* You can try searching for more at https://www.npmjs.com/search. Just enter a key to try.
** My purpose is to install and run nodejs in the sandbox, not in the original operating system. I just want to keep the operating system clean.

Regards,
fzm67054

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2337
Joined: Mon Nov 07, 2016 3:10 pm

Re: Cannot install/use node.js in sbie

Post by Barb@Invincea » Mon Nov 06, 2017 12:14 pm

Hello fzm67054 ,
* My purpose is to install and run nodejs in the sandbox, not in the original operating system. I just want to keep the operating system clean.
I am not sure this will be possible, as you are installing the program inside an isolated and restricted environment. There are many programs that will not work inside Sandboxie.

You can try to install node.js on your host instead, and then run it Sandboxed, so any modifications made by it stay inside Sandboxie (provided they work in the first place. The g flag should help finding global locations).

Regards,
Barb.-

fzm67054
Posts: 4
Joined: Thu Nov 02, 2017 4:02 am

Re: Cannot install/use node.js in sbie

Post by fzm67054 » Tue Nov 07, 2017 9:07 pm

Thank you for your reply.
* There are many programs that will not work inside Sandboxie.
How can I identify which programs can work inside Sandboxie?
Is there any documentation or website that can help me improve my understanding of the sandbox?

BTW, since I upgraded (probably after 5.2x that I remember),
I ran "C:\Program Files\Sandboxie\Start.exe" /box:XXX "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" in a tool bar.
It runs Chrome on a random Sandbox (I have many Sandboxes).
* The Chrome is installed on Host.
Now, if I want to run it correctly, I have to right-click the shortcut and select "Run Sandboxed".

Regards,
fzm67054

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2337
Joined: Mon Nov 07, 2016 3:10 pm

Re: Cannot install/use node.js in sbie

Post by Barb@Invincea » Wed Nov 08, 2017 3:09 pm

Hello fzm67054,
How can I identify which programs can work inside Sandboxie?
Is there any documentation or website that can help me improve my understanding of the sandbox?
You can search the forums for a specific application to see if there are previous reports. We also have a Known Conflicts section:
https://www.sandboxie.com/KnownConflicts
Other than that, you'll have to test the apps to see how they behave in an isolated environment. If needed, you could reach out to the application developers to see if they can provide further assistance.

Regarding your Chrome message, you can review these entries:
https://www.sandboxie.com/StartCommandLine
https://www.sandboxie.com/ForceFolder
https://www.sandboxie.com/ForceProcess

If you are still experiencing issues, please be sure to update to the latest version of Sandboxie 5.22 and start a new thread providing this info :
viewtopic.php?f=11&t=19746

Regards,
Barb.-

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest