How to install script in atom after sunsetting of atom, if possible? - text

I used to run: apm install script from the terminal before : sunsetting of atom text editor. The command now produces the following:
TypeError: Cannot read property 'latest' of undefined
at /snap/atom/286/usr/share/atom/resources/app/apm/lib/install.js:256:29
at Request._callback (/snap/atom/286/usr/share/atom/resources/app/apm/lib/request.js:57:22)
at Request.self.callback (/snap/atom/286/usr/share/atom/resources/app/apm/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request.<anonymous> (/snap/atom/286/usr/share/atom/resources/app/apm/node_modules/request/request.js:1154:10)
at Request.emit (events.js:223:5)
at IncomingMessage.<anonymous> (/snap/atom/286/usr/share/atom/resources/app/apm/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
From what I understood, atom organization has archived everything before sunset. Is there still a way to install script and still use atom, or it has to be forgotten now?

With atom, atom-beta, and atom-dev this is not possible (apm, apm-beta, and apm-dev).
You would need to install pulsar-edit, and then use the ppm command to install script from the mirrored repository. Note that pulsar-edit and ppm both have not stabilized yet and are still in beta (and so your results may vary on the behavior of the package post-install), but this is the only current method to install the script package:
install pulsar-edit
ppm install script

Related

graphicsmagic not installed in google cloud functions?

i m working in a project in firebase that uses graphics magic to convert images to pdf
it's working fine in local emulator
but doesnt in production
Error: Could not execute GraphicsMagick/ImageMagick: gm "convert" "./0" "./a4.pdf" this most likely means the gm/convert binaries can't be found at ChildProcess. (/workspace/node_modules/gm/lib/command.js:232:12) at ChildProcess.emit (events.js:198:13) at ChildProcess.EventEmitter.emit (domain.js:448:20) at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12) at onErrorNT (internal/child_process.js:415:16) at process._tickCallback (internal/process/next_tick.js:63:19)
knowing that in the cloud functions documentation they said that graphics magic is included in the environement
see : https://cloud.google.com/functions/docs/tutorials/imagemagick
Edit : gm requires installation (apt get install), i can't do that in cloud functions , cuz i dont have access to the machine.
i'm working now with pdfkit, its does the same job and doesnt require installation (requires npm install tho)
You are supposed to include gm on your dependencies. You can do so by running:
npm install gm
And have your dependencies look like:
"dependencies": {
"#google-cloud/storage": "^5.0.0",
"#google-cloud/vision": "^2.0.0",
"gm": "^1.23.1"
}
I just followed this documentation and it's working fine on Nodejs10 runtime.
UPDATE: It looks like there's an open issue on GitHub about this problem. I suggest you put a comment in there and provide detailed information similar to what the reporter did.

Installing and using npm (Node.js) module on Windows 2008 server

Can someone please advise - how to resolve this? This setup works fine locally on Windows 7 laptop, but fails on Windows 2008 server.
Here is the setup:
1. Using ASP.NET Core App and NodeServices on Windows Server 2008.
2. Installed Node.js and NPM on the server.
Logged in as one of the admin accounts "xyz". When I install a npm module - in this case, cypress test framework, it installs under the path:
C:\Users\xyz\AppData\Local
But when I run the application, it looks for the module under the path:
C:\Windows\system32\config\systemprofile\AppData\Local\Cypress\Cache\3.1.5\Cypress\
The application fails, complaining that the module is not found.
Things I tried so far:
1. Copied the cypress module directly from user localappdata folder to above location. Then it works.
2. Tried giving full path to the var cypress = require('cypress') - it finds the module, but whenever we try to use cypress, gives the same error.
3. Tried changing the nom prefix as well as cache location to the above path, but npm install cypress always installs under user's localappdata path only.
Any ideas on how to - either make the npm install, install the module at desired location. OR make the application look at the desired path?
Thanks a lot.
Here is the error:
An unhandled exception occurred while processing the request.
NodeInvocationException: No version of Cypress is installed in: C:\Windows\system32\config\systemprofile\AppData\Local\Cypress\Cache\3.1.5\Cypress
Please reinstall Cypress by running: cypress install
----------
Cypress executable not found at: C:\Windows\system32\config\systemprofile\AppData\Local\Cypress\Cache\3.1.5\Cypress\Cypress.exe
----------
Platform: win32 (6.1.7601)
Cypress Version: 3.1.5
Error: No version of Cypress is installed in: C:\Windows\system32\config\systemprofile\AppData\Local\Cypress\Cache\3.1.5\Cypress
Please reinstall Cypress by running: cypress install
----------
Cypress executable not found at: C:\Windows\system32\config\systemprofile\AppData\Local\Cypress\Cache\3.1.5\Cypress\Cypress.exe
----------
Platform: win32 (6.1.7601)
Cypress Version: 3.1.5
at raise (C:\inetpub\wwwroot\projectTest\node_modules\cypress\lib\errors.js:161:13)
From previous event:
at C:\inetpub\wwwroot\EmbeddedDashboard\node_modules\cypress\lib\errors.js:169:37
at C:\inetpub\wwwroot\projectTest\node_modules\cypress\lib\tasks\verify.js:48:60
From previous event:
at checkExecutable (C:\inetpub\wwwroot\projectTest\node_modules\cypress\lib\tasks\verify.js:43:11)
at C:\inetpub\wwwroot\projectTest\node_modules\cypress\lib\tasks\verify.js:213:12
at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
at Object.start (C:\inetpub\wwwroot\projectTest\node_modules\cypress\lib\tasks\verify.js:212:6)
at Object.start (C:\inetpub\wwwroot\projectTest\node_modules\cypress\lib\exec\run.js:130:19)
at C:\inetpub\wwwroot\projectTest\node_modules\cypress\lib\cypress.js:29:19
at _fileCreated (C:\inetpub\wwwroot\projectTest\node_modules\tmp\lib\tmp.js:246:7)
at FSReqWrap.oncomplete (fs.js:82:15)
From previous event:
at Object.run (C:\inetpub\wwwroot\projectTest\node_modules\cypress\lib\cypress.js:26:28)
at module.exports.cypress.run.then (C:\inetpub\wwwroot\projectTest\Scripts\RunTests.js:4:13)
at C:\Windows\TEMP\mecqsmig.e5o:166:18
at IncomingMessage.<anonymous> (C:\Windows\TEMP\mecqsmig.e5o:186:37)
at emitNone (events.js:67:13)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at nextTickCallbackWith2Args (node.js:474:9)
at process._tickCallback (node.js:388:17)
Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.InvokeExportAsync<T>(NodeInvocationInfo invocationInfo, CancellationToken cancellationToken)
Cypress uses cachedir to find the correct location to install Cypress into. C:\Windows\System32\config\systemprofile is the home folder of the SYSTEM user on Windows. Somehow, npm install is being executed as SYSTEM, not as your user. This would cause Cypress will attempt to install to SYSTEM's %APPDATA% directory, which is C:\Windows\System32\config\systemprofile.
This would make sense, according to the system requirements of Cypress:
Windows 7+, only 32bit binaries are provided for Windows.
I figured out how to resolve this. For some reason, when I run the application, even though it is configured to run under a service account, it still kept using the default system location for cache location.
You can configure the cache location of Cypress by setting an environment variable to your desired location. That resolved the issue for me. Here is the link to it: https://docs.cypress.io/guides/getting-started/installing-cypress.html#Binary-cache
Basically, you set a value to this environment variable CYPRESS_CACHE_FOLDER and you are set.
Hope this helps someone.

Error: Fontconfig warning: ignoring UTF-8: not a valid region tag

I have Ubuntu 18.04.1 LTS Instance running Nginx and NodeJs project, I am trying to create a PDF using html-pdf library but Its giving me following issue.
Error: Fontconfig warning: ignoring UTF-8: not a valid region tag
at ChildProcess.emit (events.js:182:13)
at ChildProcess.EventEmitter.emit (domain.js:442:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
I have tried all the possible solution available on the internet for eg.
https://github.com/ariya/phantomjs/issues/13433
Might be I am missing some step but In the end I am still stuck at generating PDF.
Thank you In Advance
Please add these following using Octave-CLI
LANG="en_US.UTF-8"
LANGUAGE="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
That resolved the issue for me.

Nodejs zlib throwing a no method error

I just installed the ebay-api package through npm. One of it's dependencies is restler and it's throwing an error that I can't seem to fix.
TypeError: Object #<Object> has no method 'gunzip'
at IncomingMessage.<anonymous> (node_modules/restler/lib/restler.js:428:10)
at EventEmitter._decode (node_modules/restler/lib/restler.js:161:25)
at IncomingMessage.<anonymous> (node_modules/restler/lib/restler.js:140:14)
at IncomingMessage.emit (events.js:88:20)
at HTTPParser.onMessageComplete (http.js:137:23)
at CleartextStream.ondata (http.js:1125:24)
at CleartextStream._push (tls.js:363:27)
at SecurePair.cycle (tls.js:679:20)
at EncryptedStream.write (tls.js:122:13)
at Socket.ondata (stream.js:38:26)
Line 428 is:
zlib.gunzip(buf, callback);
I'm running node v0.5.11-pre and the most up-to-date restler install as well. Any help here would be greatly appreciated.
Node 0.5.11-pre does not have the zlib helper method gunzip.
The current stable version of restler is >= 0.6.0 unfortunately.
You may be able to patch that method on the Node module, but there may very well be other issues. Would upgrading to a stable version of Node be reasonable for you? Even if just to 0.6.0, which should be very similar to 0.5.11-pre.

Node.js Crawler Error

I'm on Mac OSX and I've been trying to use Node.js with Crawler. Now i've just installed following steps as it instructed:
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install
curl http://npmjs.org/install.sh | sh
npm install crawler
As soon as i've installed the last one (Crawler), when i test run the test/simple.js as in its sample, i'm getting following errors:
The "sys" module is now called "util". It should have a similar interface.
http://jamendo.com/
http://tedxparis.com
/crawler/node_modules/crawler/lib/crawler.js:74
response.body = body;
^
TypeError: Cannot set property 'body' of undefined
at Object.callback (/crawler/node_modules/crawler/lib/crawler.js:74:39)
at Request._callback (/crawler/node_modules/crawler/lib/crawler.js:70:43)
at /crawler/node_modules/crawler/node_modules/request/main.js:119:22
at Request.<anonymous> (native)
at Request.emit (events.js:67:17)
at Object._onTimeout (/crawler/node_modules/crawler/node_modules/request/main.js:532:12)
at Timer.ontimeout (timers.js:84:39)
This means the Crawler doesn't work yet. How can i fix it?
You have a few options:
Try a newer version of Crawler
Use an older version of Node
Use a different module (recommended, as Crawler is very out of date)
Fix Crawler yourself (and submit your patches!, but it seems nobody is maintaining this project anymore)
If this is just a one-time error, you can wrap the whole thing in a try/catch and handle it as needed.
You may also be interested in trying my Node Crawler (https://github.com/ecdeveloper/node-web-crawler). It's not a module but an independent web app. It uses Mongo, Express, Socket.io, Twitter bootstrap.

Resources