Azure deployment of Swagger Node.js generated server bundle using Git failing - node.js

I'm having some difficulties deploying my project to azure. I've created a web-app and followed all the steps in deployment but it seems that some of the libraries are causing problems in that their system path is too long..
Your expert input is welcome!
Thanks so much.
Below is the log produced by Azure.
Invalid path for filesystem 'D:/home/site/repository/node_modules/swagger-tools/node_modules/swagger-converter/node_modules/lodash.clonedeep/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash._basebind/node_modules/lodash._basecreate/.gitattributes': The data area passed to a system call is too small.\r\n
UPDATE:
I removed the node_modules folder and let Azure download the libraries needed. This got further but still produced errors. Below is the past-bin with my errors.
http://pastebin.com/m3BTRYQ4
UPDATE:
I used the console to manual attempt to install the libraries. Here's the results..
D:\home\site>npm install swagger-tools -g
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\Program Files (x86)\nodejs\4.4.7\node.exe" "D:\Program Files (x86)\npm\2.15.8\node_modules\npm\bin\npm-cli.js" "install" "swagger-tools" "-g"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! path D:\local\AppData\npm\node_modules\swagger-tools\node_modules\swagger-converter\node_modules\lodash.clonedeep\node_modules\lodash._basecreatecallback\node_modules\lodash.bind\node_modules\lodash._createwrapper\node_modules\lodash._basecreatewrapper\package.json.1152100249
npm ERR! code EINVAL
npm ERR! errno -4071
npm ERR! syscall rename
npm ERR! EINVAL: invalid argument, rename 'D:\local\AppData\npm\node_modules\swagger-tools\node_modules\swagger-converter\node_modules\lodash.clonedeep\node_modules\lodash._basecreatecallback\node_modules\lodash.bind\node_modules\lodash._createwrapper\node_modules\lodash._basecreatewrapper\package.json.1152100249' -> 'D:\local\AppData\npm\node_modules\swagger-tools\node_modules\swagger-converter\node_modules\lodash.clonedeep\node_modules\lodash._basecreatecallback\node_modules\lodash.bind\node_modules\lodash._createwrapper\node_modules\lodash._basecreatewrapper\package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! D:\home\site\npm-debug.log
D:\home\site>
Looks like swagger-tools tries to use a command that only works with Linux / OSX systems.
Any help is appreciated!

I try to use a higher node.js version which will include a npm with version grander than 3. And it worked successfully on my side.
Please try to specify a node.js version in your package.json file, E.G.:
"engines": {
"node": ">=5.0.0"
}
And then deploy to Azure via Git again.
Any further concern, please feel free to let me know.

Related

IBM Mobile First - mfpdev-cli Installation Failure

I have issue while installing npm mfpdev-cli (IBM Mobile First CLI).
I am using node v 6.11.2 npm v 5.4.1
I am unable to install mfpdev-cli. I am getting the below error:
Error message:
npm ERR! path /Users/divya/Desktop/MFP/mdo-windows-support/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! syscall open
npm ERR! package.json ENOENT: no such file or directory, open '/Users/divya/Desktop/MFP/mdo-windows-support/package.json'
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/divya/.npm/_logs/2017-09-12T03_05_20_995Z-debug.log
Message:
I ran the installation in the current working directory which has Package.json file but the error says the package.json doesn't exist. The path, it is showing is not right- "/Users/divya/Desktop/MFP/mdo-windows-support/package.json". It has to be "Users/divya/Desktop/MFP/nzrb-tab-mobilefirst/package.json". How do I change the path?
I am not sure what causing this issue. Much appreciated your help/suggestions.
IBM MobileFirst CLI is not supported in the npm version whatever you are trying with.
Try installing the same with npm version 3.10.10 and this should resolve the issue which you are facing.

error in custom yeoman generator "You don't seem to have a generator with the name scotchmeans installed."

I created custom yeoman generator following below link.
https://scotch.io/tutorials/create-a-custom-yeoman-generator-in-4-easy-steps
i've done all the required steps when i use npm link in the node command prompt, i got below error
C:\Users\welcome\Desktop\bhargav\generator-scotchmeans>npm link
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "link"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! Package must have a name field to be linked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\welcome\Desktop\bhargav\generator-scotchmeans\npm-debug.log
and when i do "yo scotchmeans" i got below error
C:\Users\welcome\Desktop\bhargav\generator-scotchmeans>yo scotchmeans
Error scotchmeans
You don't seem to have a generator with the name scotchmeans installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 2 registered generators run yo with the --help option.
can anyone please give suggestion how to resolve
A little late, maybe, but I encountered this error as well. In my case, the command
npm link
did not do what I thought it would do. Instead, I had to specify the package name explicitly:
npm link generator-mygenerator
Afterwards, I was successfully able to call the generator:
yo mygenerator

Consuming node module in a tar file exposed by team city artifact

So there is currently a team city server which packages a node module for internal use and exposes it via an artifact. The artifact is a tar.gzfile which contains package.json, dist/**/*, readme.md files/folders.
In my package.json dependencies (for a dependent package) I have something like:
"some-module": "http://some-address/guestAuth/repository/download/some-project/.lastSuccessful/some-module.tar.gz"
Which resolves correctly to the tar.gz file, and I can download and open it all fine when doing it manually. However the odd thing is that when I do an npm install npm blows up with the error:
npm ERR! tar.unpack untar error C:\Users\Blah\AppData\Local\Temp\npm-10684-84325da0\some-server\guestAuth\repository\download\some-project\.lastSuccessful\some-module.tar.gz
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.3
npm ERR! path C:\Users\Blah\AppData\Local\Temp\npm-10684-84325da0\unpack-f18f9e1b
npm ERR! code EEXIST
npm ERR! errno -4075
npm ERR! syscall mkdir
npm ERR! EEXIST: file already exists, mkdir 'C:\Users\Blah\AppData\Local\Temp\npm-10684-84325da0\unpack-f18f9e1b'
npm ERR! File exists: C:\Users\Blah\AppData\Local\Temp\npm-10684-84325da0\unpack-f18f9e1b
npm ERR! Move it away, and try again.
I am super confused as I have tried doing npm cache clean and deleting my temp folder in the appdata/local nothing seems to stop this error.
I have looked over lots of related issues like:
https://github.com/npm/npm/issues/6309
https://github.com/npm/npm/issues/5133
However nothing seems to work, I am on windows 10 64-bit using npm 3.5.3 and node 4.2.6.
Has anyone else achieved the same sort of thing or is there something I am missing here as it is a blocker on a current project and none of us seem to have any idea why its blowing up.
Solved it.
So the issue was that I was not putting a containing folder in my tar file, so if you add a root folder and have your package and other files underneath that, it all works.

‘node-gyp rebuild’ installation error when adding a package to meteor app in Windows 7

I was trying to add a package (mizzao:turkserver) to my Meteor application, but I kept getting this error:
mizzao:turkserver: updating npm dependencies -- request, libxmljs,
validator, querystring, async, deepmerge...
gypnpm ERR! Windows_NT 6.1.7601
npm ERR! argv
"C:\\Users\\PC4all\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.1.3\\mt-os
.windows.x86_32\\dev_bundle\\bin\\\\node.exe"
"C:\\Users\\PC4all\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.1.3\\mt-os
.windows.x86_32\\dev_bundle\\bin\\node_modules\\npm\\bin\\npm-cli.js"
"install" "libxmljs#0.8.1"
npm ERR! node v0.10.36
npm ERR! npm v2.7.3
npm ERR! code ELIFECYCLE
npm ERR! libxmljs#0.8.1 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the libxmljs#0.8.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls libxmljs
npm ERR! There is likely additional logging output above.
=> Babel active on file extensions: es6.js, es6, jsx
=> Errors while adding packages:
While building package mizzao:turkserver:
error: couldn't install npm package
I am developing my Meteor application on a Windows 7 machine and from what I have been able to gather from posts on forums, the error seems to be related to that fact (interaction between npm and Windows - I did not find any posts describing the same problem on Linux machines).
I've already tried installing the latest Python version and MS Visual Studio 2013 as suggested here: https://github.com/TooTallNate/node-gyp#installation, as well as setting some environment variables as suggested here: https://github.com/atom/atom/issues/2754. But none of those helped.
Any help would be greatly appreciated!
As I described in this comment, this seems to be an issue with the Python path being set incorrectly for npm, as Meteor's distribution of npm isn't hooking it up correctly. Most Linux distros come with Python, but Windows doesn't, so it is correlated with running Windows.
It can be fixed by making sure that Python is installed, then running the following command:
npm config set python C:\Python27\python.exe
The use of an old libxmljs is because mizzao:turkserver is dependent on a relatively old node MTurk API, which I'd like to wean it off of at some point, but isn't such a high priority at the moment.
See also:
https://github.com/lovell/sharp/issues/163
https://www.robertkehoe.com/2015/03/fix-node-gyp-rebuild-error-on-windows/

Error Node downgrading

I am a beginner in development, but I want to become a leading developer of mobile applications ;)
I am on Windows 8. I want to install Cordova but I have to downgrade Node I currently 0.12.x. Version I could see that he had to make a downgrade in 0.10.x. Version
I do a downgrading but when I want to install an earlier version (0.10.32 and others)
npm unistall n
npm install n#0.10.32
I have the following errors:
C:\Users\Jeremy>npm install n#0.10.32
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (
x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "n#0.10.32"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! version not found: n#0.10.32
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Jeremy\npm-debug.log
if your workflow does not involve global npm installs, etc, one approach is to simply use the node.exe executable as a stand-alone -- just grab the version you need from nodejs.org/dist and drop it into the working directory for a particular project. (Node.exe can run without actually 'installing' anything onto the system.)
then you could then specify the version of packages that you need for that version of node.exe like so: npm install foo#0.1.1.

Resources