The error message "The specified path could not be found" is thrown by electron-winstaller when trying to create a zip file from a directory using the Squirrel.Utility.CreateZipFromDirectory method. This

I'm currently in the process of creating an electron installer for the Windows platform using Azure DevOps. The electron-package command was successfully executed with npm run build (refer to my package.json). However, when attempting to create RELEASES, .msi, .exe, and .nupkg files using electron-winstaller, an error occurs:

The system cannot find the specified path. at Squirrel.Utility.d__23.MoveNext()<---

The specific command used was npm run create-installer-win which triggers node build.js.

This build is being handled by an on-premises agent running Windows Server 2014.

Everything works perfectly fine when tested locally.

View my build.js image here

Check out my package.json image here

Image description here

Answer №1

The encounter involved a mischievous squirrel.

My agent is operating under the NT AUTHORITY\System user, which lacks the necessary permissions to create the SquirrelTemp folder in %appdata%. As a result, when attempting to create the folder in the current directory, it triggers an error due to the absence of the SquirrelTemp folder.

To resolve this issue, I implemented a solution by establishing an environment variable SQUIRREL_TEMP within the build pipeline, setting its value to %currentfolder%\SquirrelTemp, and successfully rectifying the problem.

Credit goes to https://github.com/Squirrel/Squirrel.Windows/issues/1081#issuecomment-340958128

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue encountered while trying to install the Discord Anti Spam package using NPM

Can someone assist me with this frustrating error I'm facing? Despite updating Discord.js, the message still indicates that it is not in the registry. I have tried everything I can think of. Any insights on what might be going wrong or what I may be o ...

Are there equivalent npm variables like (`npm_config_`) available in yarn console scripts?

Utilizing variables in custom npm commands is possible (example taken from ): { "scripts": { "demo": "echo \"Hello $npm_config_first $npm_config_last\"" } } Can this functionality also be achieved ...

Tips for executing a .exe file in stealth mode using JavaScript?

I am currently working on the transition of my vb.net application to JavaScript and I am facing a challenge. I need to find a way to execute an .exe file in hidden mode using JS. Below is the snippet from my vb.net code: Dim p As Process = New Pro ...

What are the steps to releasing and utilizing a Node package in Laravel 5?

Recently, I've started integrating Vuejs into my existing laravel application. Although it's a new experience for me, I'm excited to learn more about it. One feature that caught my eye is this component: A multiselect with search-autocomple ...

Tips for hiding the view sub-menu in an electron application's main window

Hello, I am seeking assistance with the removal of 3 options from the electron title menu. The options are: reload Force reload Toggle developer tools This is what needs to be removed: So far, here is what I have attempted: background.js import { ...

Setting up a project with NextJs, ExpressJs, and connecting to postgreSQL with pgadmin for deployment

In this situation, I have a fully prepared NextJs app, an ExpressJs Server, and postgreSQL (pgAdmin) all ready to go. My question is, should I take the step to deploy Next to Vercel, obtain a domain from GoDaddy, and connect it to my project? Should I als ...

Exploring ways to capture all console outputs or retrieve the current console content in frontend development

Currently working with Angular and looking to integrate a bug reporting feature into my application. I want to capture the content of the browser's console for debugging purposes. However, I'm unsure of how to access it. Not all errors are logge ...

We encountered an error while trying to locate the 'socket.io' view in the views directory

Having an issue with my nodejs server. Check out the code below: server.js global.jQuery = global.$ = require('jquery'); var express = require('express'), path = require('path'), menu = require("./routes/menu"); var ...

Is there anyone who can assist me with the problem I'm facing where Javascript post call is sending a null value to my mongoDB

As a beginner in JS, NodeJS, and MongoDB, I decided to create a quiz website to sharpen my coding skills. However, I have encountered an issue while trying to send the username (string) and total marks (int) to MongoDB using the Post method. Surprisingly, ...

Issue with Npm functionality following installation of Yarn (unable to locate number-is-nan)

After installing yarn via brew on my macOS 10.13, it was working perfectly fine. However, I encountered a problem when trying to use npm. Every command I attempted to run resulted in the following error: gregor-mbp:~ gregor$ npm -v module.js:471 throw ...

Potential absence of object.ts(2531)

Currently, I am working on a project using Node.js with Typescript. My task involves finding a specific MongoDB document, updating certain values within it, and then saving the changes made. However, when I try to save the updated document, an error is bei ...

Convert the buffer encoded in base64

Could anyone provide some insights into this peculiar behavior? Buffer.from('5d9RAjZ2GCob-86_Ql', 'base64url').toString('base64url') // 5d9RAjZ2GCob-86_Qg I urge you to carefully examine the difference between the last chara ...

"Failed to insert or update a child record in the database due to a SQL

I encountered an issue while trying to perform the following transaction: static async save(habit){ await db.beginTransaction; try { await db.execute('SELECT @habitId:=MAX(habits.habitId)+1 FROM habits'); await db.execute( ...

Waiting for a function to complete before ending a NodeJS script

I'm facing a dilemma with my telegram bot - I need to send a message, but also stop the code from continuing execution. consloe.log("You shouldn't see this text"); Oddly enough, the message doesn't get sent when I include process.exit(). I ...

Leveraging npm to exclusively install the necessary packages for the existing project

Starting my journey with node/npm has brought about a lot of challenges for me. Figuring out the correct path to install packages Loading the package in Node I envision having a designated package folder containing only the necessary packages for my curr ...

Resolving conflicts between AbortSignal in node_modules/@types/node/globals.d.ts and node_modules/typescript/lib/lib.dom.d.ts within an Angular project

An issue occurred in the file node_modules/@types/node/globals.d.ts at line 72. The error message is TS2403: Subsequent variable declarations must have the same type. Variable 'AbortSignal' should be of type '{ new (): AbortSignal; prototype ...

Steps for manually implementing Ionic4:1. Install the necessary dependencies for Ionic4

My project requires the use of Ionic 4; however, when I install Ionic via npm, it defaults to version 5. Is there a way to install a specific version of Ionic using npm? npm install ionic@4 ...

What is the most efficient way to iterate through an array to push properties into an object nested within another array?

I have been working on a small Angular application that functions as a scheduler, allowing users to input a Name, Start and End dates, and toggle a boolean checkbox through a form. One challenge I am facing is trying to assign the names entered by each use ...

What could be the reason behind the undefined axios cookie issue?

After successfully hitting an endpoint with Postman, I noticed that the value of req.headers.cookies is undefined when using axios. However, browser cookies are functioning correctly. In contrast, Postman requests show that the value of req.headers.cookie ...

As soon as "Compiling /..." finishes, Next.js shuts down abruptly

When I execute npm run dev on my Next.js project with Fluent UI React installed, it exits abruptly after displaying either "Compiling /..." or "Compiled / in (x) seconds". @GavinGoGaming ➜ /workspaces/MuiTestProjects/glacier-client (main) $ npm run dev ...