Npm package install failure - node.js

Trying to learn nodejs following a few articles. I'm able to download and make sure its working using a video from youtube. But now I'm trying to incorporate that in Visual Studio .net 4.5.2. I've tried to added it via new get package manager and the PM console each come back to same error.
"Install-Package: The specified path, file or both are to long. Less than 260 and directory name less than 248" Self explanatory, found this article
So I tried:
npm-flatten
npm-dedupe
also Enable Win32 long paths
It starts adding package npm 3.5.2 files and folders then bombs out and spits the same error. What else am I missing in order to get this package installed?
Thanks for any help

Related

Azure Function 'unable to find module' after following installation instructions

I'm trying trying to use a node module inside my Azure Functions project. I've tried following these instructions several times but still can't use the module I'm trying to bring in.
After bringing in my package.json and running npm install, I can see the node_modules folder (actual modules are located in node_modules/.staging). Upon restarting the function and trying to run it, I get Error: Cannot find module '_____'.
I'm following the instructions correctly. Any suggestions on how to get the modules to work?
You did everything correctly, after npm install, please wait for some time. Modules being in ./staging folder means the installation is still in progress.
You will see added packages prompt in console after the installation is finished.
Update--Avoid long time waiting for module install.
As #brettsam mentioned in comment, with azure-functions-pack tool(also a module), we can place all the modules in a single file, no need to install online and wait. You can search for your function name to find your function scripts if you want to edit after publication.

Exception could not locate binding file after updating electron version

I'm working on updating my project from using electron version 1.2.5
to the newest electron at this time which is 1.7.7 (atleast it was when I downloaded it). My node version 6.9.1.
I've encountered a problem when I start my project with this new electron version,
the error in general is about "could not locate the binding files. and it mostly regards the async module.
There is also some part of the exception regarding node-etcd module which I use in my project (version 5.0.3)
I found some information about this type of exception online but most of them says stuffs about rebuilding some node module using some npm commands which I didn't quiet understand. I tried to install async module again in a new folder and replace it (with its deps) in the node modules folder im currently using for my project, but I still got the same error.
I'm working in an offline enviorment where I can't take my project "out" to a computer with internet access, I can only bring things from the web to my project (like installing in some folder and then copying that into my project) so any npm or other commands that require web connection are not available to me directly on my work computer. (I can only use them in a different computer and copy the results to a flash drive and bring them to th
Here's 2 pictures of the error (sorry about the quality, its the best I could get):
First part of error
Second part of error
The solution that fixed the problem in my case was going into node_modules - > deasync - > index.js
Before line 31 I added a newline (next to the binding line)
and wrote:
modPath = __dirname;
This solution is hacky, it was accually ly found by an associate a while back, so I am not sure why it works, it might be an issue in deasync, but it fixed the problem.

When attempting to migrate, Truffle (nodeJS) waffles between two errors?

I'm using truffle with a Node.js project, and when I attempt to migrate the project, I get the following error:
Windows Script Host
However, when I use the suggested fix, which is to rename the truffle.js file to something other than truffle.js (i.e. truffle-config.js), then I get a different error:
Could not find suitable configuration file.
When I rename the configuration file back to "truffle.js", then I get the first error all over again.
The solutions I've tried have included using Windows Powershell to run the program and running the command npm install --force -g truffle, neither of which have worked. I've looked into the recommended solution (https://github.com/trufflesuite/truffle/issues/150), and none of the proposed solutions have worked so far.

Android Studio cant find or install play-services 7 /wearable

I have a new windows 8.1 machine, and am trying to get my android IDE environment installed. But there seems to be some issues that i have never encountered before. my existing projects are not compiling because the system can not find or even download the proper play services libs..
Error:A problem occurred configuring project ':mobile'.
Could not resolve all dependencies for configuration ':mobile:_debugCompile'.
A problem occurred configuring project ':wear'.
Could not resolve all dependencies for configuration ':wear:_debugCompile'.
Could not find com.google.android.gms:play-services-wearable:7.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
Required by:
AndroidClickDogTrainer:wear:unspecified
So i tried using the SDK manager to insure i had the proper play services but
I keep getting the following error from my SDK manager in Android Studio on my Windows 8.1 machine.
This is a clean install, and i thought it may be my firewall settings but after turning off my firewall completely it is still happening:
Refresh Sources: Fetched Add-ons List successfully Refresh Sources
Failed to fetch URL
https://dl.google.com/android/repository/addon.xml, reason: File not
found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml/addon.xml,
reason: File not found Refresh Sources: Failed to fetch URL
https://dl.google.com/android/repository/addon.xml, reason: File not
found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml/addon.xml,
reason: File not found Ignoring unknown package filter
'extra-google-m2repository'Warning: The package filter removed all
packages. There is nothing to install.
Please consider trying to update again without a package filter.
No matter what i do.. TURN OFF FIRE WALL, RUN AS ADMIN.. etc etc.. it just won't install the play services libs..
please help
So I searched high and low for an answer to this, and it seems a lot of people are having this and similar issues and creating really cumbersome workarounds that include everything from re-writing parts of the android.bat file to uninstalling the SDK and re-installing it from scratch.. for me none of those solutions worked.. but what seems to have fixed the problem was actually quite simple.
hope this helps others..
open the Android SDK Manager.. click on TOOLS>Options and check "Force https://.. sources to be fetched using http://.."

Cannot run servicestack bundler

I was trying to upgrade our installation of servicestack.bundler to version 1.1.22 but the new version won't work on Windows. I tried to download the nuget package into a new solution in Visual Studio but get the same error.
The error we get is
{ [Error: Cannot find module './to-css-visitor.js'] code: 'MODULE_NOT_FOUND' }
When I look in the node_modules folder and then the subfolders for Less there is no to-css-visitor.js file there. I cannot see the file in the source code on GitHub either. The source seems to look for the file in this folder:
node_modules/less/lib/less
Should the file be installed separately or is it missing from the source? Is there a better version than 1.1.20 to get instead?
Version 1.1.27 appears to have rectified the issue.

Resources