I'm trying to install atom-beautify plugin to GitHub Atom editor with apm but still getting this error:
npm ERR! git fetch -a origin (https://github.com/Benvie/harmony-collections.git) fatal: Unable to find remote helper for 'https'
npm WARN `git config --get remote.origin.url` returned wrong result (git://github.com/ariya/esprima.git)
npm ERR! git clone git://github.com/ariya/esprima.git Cloning into bare repository 'C:\Users\pc00120\.atom\.node-gyp\.atom\.apm\_git-remotes\git-github-com-ariya-esprima-git-9077e517'...
npm ERR! git clone git://github.com/ariya/esprima.git fatal: Unable to look up github.com (port 9418) (Unknown host.)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Users\\pc00120\\AppData\\Local\\atom\\app-0.176.0\\resources\\app\\apm\\bin\\node.exe" "c:\\Users\\pc00120\\AppData\\Local\\atom\\app-0.176.0\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "c:\\Users\\pc00120\\AppData\\Local\\atom\\app-0.176.0\\resources\\app\\apm\\.apmrc" "--userconfig" "C:\\Users\\pc00120\\.atom\\.apmrc" "install" "C:\\Users\\pc00120\\AppData\\Local\\Temp\\d-115029-4180-1mvqz47\\package.tgz" "--target=0.20.0" "--arch=ia32" "--msvs_version=2012"
npm ERR! node v0.10.35
npm ERR! npm v2.3.0
npm ERR! code 128
npm ERR! Command failed: fatal: Unable to find remote helper for 'https'
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
I'm behind corporate proxy but I have configured it properly and can execute e.g. these commands with no error:
git clone https://github.com/Benvie/harmony-collections.git
git clone git://github.com/ariya/esprima.git
my .apmrc
https-proxy=http://username:passwd#my.proxy.com:3128
http-proxy=http://username:passwd#my.proxy.com:3128
strict-ssl=false
some other conf
Windows 7 64bit
Atom 0.176.0
Git 1.9.5.msysgit.0
I've already discussed this problem on plugin's forum on GitHub but with no success. Any suggestions?
This is known npm bug, it has been almost fixed, see https://github.com/npm/npm/pull/5621/commits (unfortunately merge failed). Quick and dirty fix: add this line u = u.replace(/^git:/, "https:") before var normalized = normalizeGitUrl(u) in add-remote.git.js (AppData\Local\atom\app-0.176.0\resources\app\apm\node_modules\npm\lib\cache\add-remote.git.js)
The accepted answer did not work for me. What did work, was to add more git folders to the path.
I have a batch file, e.g. atom-gitpaths.bat with the following contents:
#ECHO OFF
ECHO Adding Git paths to the system path...
PATH=C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\libexec\git-core;%PATH%
ECHO Done. Launching atom...
CALL atom.cmd
Related
So I recently got a Windows laptop at work, trying to set up my dev environment and I am getting a strange issue when trying to install our private gitlab npm packages.
I try npm install and it says it cannot find the package even though it has been published to our private registry. This seems to only be happening on my windows machine. The package can be found no problem on my macbook.
npm i
npm ERR! code E404
npm ERR! 404 Not Found - GET https://gitlab.orgname.com/api/v4/projects/118/packages/npm/#integrations%2fcommon-ui
npm ERR! 404
npm ERR! 404 '#integrations/common-ui#^1.0.4' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jack.lovett\AppData\Local\npm-cache\_logs\2022-12-13T10_08_06_142Z-debug-0.log
It seems that / in the path is being encoded to %2f so then it can't find the package anymore.
I can't find any help online for this issue so any ideas would be greatly appreciated.
The %2f part in the url seemed to not be relevant and just caused me to go down a rabbit hole of unrelated issues.
What seemed to be the problem was that i did not have NVM correctly set to my PATH in my environment variables.
When adding to path I added the location of my /node.js directory in /"Program Files"/node.js. This then added to my path the correct node version used by nvm.
I then attempted to authenticate with our private package registry again and it all worked as expected.
I have a Vue Storefront 2 project with Magento 2 as it CMS. Locally everything runs fine.
When I try to run NPM install on my Plesk server before I can build and deploy it, it gives the following error:
npm ERR! code 1
npm ERR! path /var/www/vhosts/vuestorefront2.dev/node_modules/deasync
npm ERR! command failed
npm ERR! command sh -c node ./build.js
npm ERR! linux-x64-node-16 exists; testing
npm ERR! Problem with the binary; manual build incoming
npm ERR! stdout=
npm ERR! err=Error: Command failed: /opt/plesk/node/16/bin/node quick-test.js
npm ERR! /var/www/vhosts/vuestorefront2.dev/node_modules/bindings/bindings.js:135
I have tried to remove all references of deasync in my package-lock.json.
Even though NPM install then runs and allows me to build to project afterwards, it did not load any products from Magento anymore on the deployed instance. Locally I do however fetch and display products succesfully.
When you have an issue regarding a build remotely, the first step is usually to build it locally (with something like npm run build, then run it locally npm run start) to be sure if it's a Nuxt issue or a hosting/platform issue.
Here, it looked like OP could fix his problem by forcing a specific endpoint to use the production URL. Maybe he is lacking some local server.
This fixed the issue
publicRuntimeConfig: {
middlewareUrl: process.env.NODE_ENV === "production"
? "https://example.com/api/" // Your production URL
: "http://localhost:3000/api/",
}
I'm trying to get started with Svelte. All guides I've found list two commands as all that's required:
npm install
npm run dev
However, in Windows 10, with a fresh install of Node 12.16.3 LTS and NPM 6.14.4 (installed with NVM-Windows after uninstalling NodeJS completely, per this guide), once I hit npm run dev, I get the following errors:
$ npm run dev
> svelte-app#1.0.0 dev C:\Users\Matthew\Desktop\SvelteTest
> rollup -c -w
'rollup' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! svelte-app#1.0.0 dev: `rollup -c -w`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the svelte-app#1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Matthew\AppData\Roaming\npm-cache\_logs\2020-05-23T02_58_39_101Z-debug.log
"Hmm... Okay, that's weird, since every tutorial I've watched and guide I've read has this including in npm install, but, no worries, I'll just install rollup," I think to myself... A quick npm install -g rollup later, and the error is fixed! Good start. Sadly, this doesn't last too long, since now I run into the following issue:
$ npm run dev
> svelte-app#1.0.0 dev C:\Users\Matthew\Desktop\SvelteTest
> rollup -c -w
rollup v2.10.7
bundles src/main.js → public\build\bundle.js...
LiveReload enabled
created public\build\bundle.js in 338ms
> svelte-app#1.0.0 start C:\Users\Matthew\Desktop\SvelteTest
> sirv public "--dev"
'sirv' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! svelte-app#1.0.0 start: `sirv public "--dev"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the svelte-app#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Matthew\AppData\Roaming\npm-cache\_logs\2020-05-23T03_00_53_008Z-debug.log
This time, no amount of npm install -g sirv will work. Is there a step I'm missing to getting this project to run?
Some notes:
I can get it to work in WSL Ubuntu 18.04 LTS, but would prefer not to have to use WSL if at all possible.
I don't see anything anywhere online that says that Windows isn't supported... is it not? Am I not looking hard enough?
When I run npm install -g rollup, I see the following warnings:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\rollup\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
I assume that, since this is listed as an optional dependency, it is not the source of the issue. Nonetheless, it feels silly not to bring it up — just in case. These same warnings appear during npm install.
The files npm-cahce\_logs\[datetime]-debug.log don't contain any usefull information as far as I can tell, they simply say, "sirv public "--dev" → Failed to start exec script" followed by a stack-trace.
After the second error, the program does not automatically terminate — but it is not available at localhost:5000.
I had my files in OneDrive for a while (they're now on my Desktop, which is not synced or tracked in any way), and OneDrive was upset about the files in node_modules/.bin, saying that they "couldn't be synced because of their name or type" -- this leads me to believe that perhaps this is a wider Windows/MS problem? Somehow, I doubt this is the issue.
Just to double check, I tried all of my aforementioned steps in Git Bash (my preferred terminal on Windows), CMD, and Powershell -- all exhibited the same behaviour.
Thanks in advance.
Ah, well... I feel silly now. Same issue as with Rollup — I had to install it with npm globally. But, I missed that there's both sirv and sirv-cli on NPM.
Running npm install -g sirv-cli fixed my issue.
However... I would still like to know why I don't see this issue mentioned anywhere in any guide anywhere else with all the rest of Svelte's Hello World stuff. Any information would be greatly appreciated!
I kept running into this error when installing Bower through NPM on a Windows 7 machine running a precise32 Ubuntu Box on Vagrant. I tried every combination of commands and always got the same or very similar errors
Installing locally, globally, with sudo, without sudo, etc.
...
npm ERR! Error: EPERM, open '/home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js'
npm ERR! { [Error: EPERM, open '/home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: '/home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.2.0-23-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "bower" "--no-bin-links"
npm ERR! cwd /home/vagrant
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! path /home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js
npm ERR! code EPERM
npm ERR! errno 50
npm ERR! stack Error: EPERM, open '/home/vagrant/tmp/npm-1214-AHbOCwuM/1391873680685-0.36021817452274263/package/build/node_modules/cheerio/node_modules/htmlparser2/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js'
...
EDIT: As well as my answer below please note the file directory + file size limitation when using Windows (260 characters I believe)
I have had to install vagrant in a folder directly on my c:/ drive to get over this limitation as some packages end up having nested dependencies causing this limit to be exceeded. My problem was with grunt-contrib-less
Self answering as I couldn't find a solution anywhere else on StackOverflow
I eventually got it to work via changing to the root user via su root and trying to install globally again. Apparently just using sudo wasn't enough.
So it became
root#precise32: npm install -g bower --no-bin-links
EDIT: As well as this solution please note the file directory + file size limitation when using Windows (260 characters I believe)
I have had to init a vagrant instance in a folder directly on my c:/ drive to get over this limitation as some packages end up having nested dependencies causing this limit to be exceeded. My problem was with grunt-contrib-less
EDIT 2: After coming across this problem again and again I'll add a bit more information for people here regarding node modules and vagrant under Windows.
I now overcome the file path limitation via putting any long dependency chains that fail due to path length (usually EPERM) I add one of the packages in the chain to my own package.json. This means the long requirement chain is split as npm does not re-install the package deeper in the tree if it's already installed.
Just make sure you require a version which is valid for the version string for the module.
The order of the dependencies in package.json does not matter, dependencies are resolved before anything is installed
One of ops guys (vagrant and node.js quick tip) found a solution for that problem. Basically you need to have the following code in your Vagrant file:
config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
That will allow npm to create symlinks for the modules that require it.
Than install packages without forcing the symlinks. So, when running npm install on a virtual machine created through vagrant, run it as:
sudo npm install --no-bin-link
It was usefull for me when I installed the express
module.
With Vagrant 1.5 on Windows, you can now use rsync or smb folder shares which won't have this problem.
To get around the 260 character file length limit in windows, which npm seems to surpass quite easily, you can use the npm link command.
This will allow you to use node_modules local to your project. If you run it on your guest machine it will install them globally on your guest machine and then create a symlink in your projects node_modules folder. That way only the symlink is shared to the windows host machine and the 260 file length limit is not exceeded.
I go over this in more detail in this blog post here.
I'm trying to install some modules using NPM on Cygwin (Windows 7), but the install is going incredibly inconsistently. Some packages fail repeatedly on install, but some succeed; moreover, the same package can fail several times and then succeed with no change in the system. Installing the markdown package failed three times in a row, and then succeeded. The failures were:
npm ERR! couldn't unpack /tmp/npm-1310104605595/1310104605596-0.844648783095181/
tmp.tgz to /tmp/npm-1310104605595/1310104605596-0.844648783095181/contents
npm ERR! Error: EACCES, Permission denied '/tmp/npm-1310104605595/1310104605596-
0.844648783095181/contents/___package.npm/package'
npm ERR!
npm ERR! Please use 'sudo' or log in as root to run this command.
npm ERR!
npm ERR! sudo npm "install" "markdown"
npm ERR!
npm ERR! or set the 'unsafe-perm' config var to true.
npm ERR!
npm ERR! npm config set unsafe-perm true
npm ERR!
npm ERR! System CYGWIN_NT-6.1-WOW64 1.7.9(0.237/5/3)
npm ERR! command "node" "/usr/local/bin/npm" "install" "markdown"
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/Paul/node_modules/express/node_modules/connect/npm-debug.log
npm not ok
Has anyone experienced this, and if so, what was the solution? And yes, I've set the unsafe-perm config variable, and it doesn't seem to change anything... Also, this is not limited to just this package; pretty much anything I try to install seems to have this issue.
P.S: I don't know if you filled an issue at Github yet because Isaacs prefers that to Stackoverflow.com. At github he will receive an email when somebody fills an issue and has excellent respond-times. But after a quick search it seems you allready filled an issue..
Windows Support
I'm trying to install some modules
using NPM on Cygwin (Windows 7), but
the install is going incredibly
inconsistently.
NPM does NOT support Windows. Isaacs does not fix(allocate resources) to any bugs under Windows(Cygwin how does allocate some time to, but not that much) Operating System. He does fix bugs under Cygwin, but you are better of installing a POSIX OS.
Caveat 2: Sorry, Windows!
Any bugs about this not working on a
native Windows system (ie, not Cygwin)
will most likely be closed with
wontfix.
If you ask me you are probably better of(Below I point to the WIKI page to install NPM on Cygwin) installing Ubuntu(Unix) using dual-boot and do your (web)development on Unix. When you get the hang of it you probably will never switch back to Windows again.
Installing under Cygwin
Also there is a page explaining how to install NPM.
Important: Make sure you follow ALL
the steps! It’ll seem like it’s
working before you get to the end. But
it is a dirty, lying liar. Don’t
believe it. Do the steps all the way
to the end. If you don’t, you’re going
to complain that npm says
“ECONNREFUSED” and then post a bug,
and I’ll ask if you did all the steps,
and you’ll feel silly.
Did you follow these steps on their WIKI page to install NPM on Windows=> https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows)