npm installation error in ubuntu14.04 - ubuntu-14.04

I am trying to configure Titanium Appcelerator studio in Ubuntu 14.04.
I have almost configured everything but not able to install Appcelerator CLI.
Whenever i try to setup i am getting below error:
Finding latest version ...5.1.0 ✓
Validating security checksum ✓
Installing ... ✓
Compiling platform native modules ...
└ extract-opts/typechecker ... ✓
└ bunyan/dtrace-provider ... ✓
└ extract-opts/typechecker ... ✓
└ socket.io-client/ws ... ✓
└ appc-ldapjs/dtrace-provider ... ✓
└ bunyan/dtrace-provider ... ✓
└ appc-ldapjs/dtrace-provider ... ✓
└ ws/bufferutil ... ✓
└ ws/utf-8-validate ... ✓
└ chokidar/fsevents ... npm ERR! Linux 3.13.0-73-generic
npm ERR! argv "/usr/bin/nodejs" "/home/user/.linuxbrew/bin/npm" "install" "fsevents#1.0.5" "--production"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents#1.0.5
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request:
npm ERR! /home/user/.appcelerator/install/5.1.0/package/node_modules/arrow/node_modules/babel/node_modules/chokidar/npm-debug.log
Can anyone have any solution?
Please help me i am trying it out hard but not getting any solution.

What you see is the following issue:
https://jira.appcelerator.org/browse/AC-489
Please watch it and add your information. I'll ask to for it to be reopened.

This problem still occurs, but i added another comment to the ticket on jira.
The fix proposed over there by #Far does work on (X)Ubuntu 14.04, at least for me.
Of course the prerequisites, like node etc. have to be installed, but then it should be working.
The actual link for this ticket is now:
https://jira.appcelerator.org/browse/CLI-916
I did install the cli first, as the login/setup procedure is better IMHO:
sudo npm install -g appcelerator
Add the fix from the ticket (for me it was line 159 in /usr/lib/node_modules/appcelerator/lib/install.js)
Then:
appc setup
If the Fix is working, you should be greeted with the prompt for username(email) and password, followed by the 4 digit device activation code, sent to your email address (after seeing all the fancy cli download stuff).
The authorization will be saved in your home directory, so now you can download the studio zip from their page, unpack it and just run it. Login should allready be active.
Happy devtime :)

Related

Installing node-sass fails on Ubuntu 18.04

I have a simple next.js project, which I created following their tutorial. It builds and runs well on my Windows development machine.
I want to deploy it on Ubuntu 18.04.02 LTS but when I clone the git project and run npm install it fails to install node-sass with the following error message:
> node-sass#4.12.0 install /var/www/example.com/beta/node_modules/node-sass
> node scripts/install.js
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module '/var/www/example.com/beta/node_modules/node-sass/scripts/install.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.12.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.12.0 install 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: ...
Here is a gist of the log file. See the last few lines for the error (I have included the whole file in case there is other information that is useful).
My NodeJS version is 10.15.3 and my NPM version is 6.4.1. I am not sure how to run next.js project on Ubuntu.
Apparently, I needed to install it with --unsafe-perms flag:
npm install --unsafe-perms
No explanation onto why it needs this and the unsafe word is not recommended by many.
In addition, the folder permissions needed to be in such a way that the script can create folders. I had to create a folder as me, clone the repo there, run the npm install --unsafe-perms, and then set the permissions as of a production web server.
For reference see here.
Try installing it manually, prior to installing all of the other packages - there might be some package dependency issue.
npm install node-sass#4.12.0 && npm install
This module has striction about node versions, as below:
solution is: specify the module version when you install it.
P.S. Other approach:
if you just want to use scss/sass, use this module:
npm install sass sass-loader
this does NOT work for: node 16, ubuntu 18
npm install --unsafe-perms
for node 14, ubuntu 18 , I can install it:
npm install node-sass

Kudu npm install failed

I'm getting a very strange error when trying to deploy my project with kudu on Azure.
I have build my project with dotnet with VueJs. I have used the following template "https://github.com/MarkPieszak/aspnetcore-Vue-starter"
I have tried setting the WEBSITE_NODE_DEFAULT_VERSION to a few different version now without any luck.
Here are the out from Kudu:
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
Restore completed in 735.88 ms for D:\home\site\repository\projectx.csproj.
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 345.52 ms for D:\home\site\repository\projectx.csproj.
projectx -> D:\home\site\repository\bin\Release\netcoreapp2.1\projectx.dll
projectx -> D:\home\site\repository\bin\Release\netcoreapp2.1\projectx.Views.dll
NPM Installing dependencies...
npm WARN package.json assert#1.4.1 assert is also the name of a node core module.
npm WARN package.json buffer#4.9.1 buffer is also the name of a node core module.
npm WARN package.json events#1.1.1 events is also the name of a node core module.
npm WARN package.json indexof#0.0.1 No repository field.
npm WARN package.json punycode#2.1.1 punycode is also the name of a node core module.
npm WARN package.json querystring#0.2.0 querystring is also the name of a node core module.
npm WARN package.json string_decoder#1.1.1 string_decoder is also the name of a node core module.
npm WARN package.json url#0.11.0 url is also the name of a node core module.
npm WARN package.json util#0.10.4 util is also the name of a node core module.
npm WARN package.json vue-template-es2015-compiler#1.6.0 No repository field.
EXEC : npm ERR! error : Method Not Allowed [D:\home\site\repository\projectx.csproj]
npm ERR! at errorResponse (D:\Program Files (x86)\npm\1.4.28\node_modules\npm\lib\cache\add-named.js:260:10)
npm ERR! at D:\Program Files (x86)\npm\1.4.28\node_modules\npm\lib\cache\add-named.js:203:12
npm ERR! at saved (D:\Program Files (x86)\npm\1.4.28\node_modules\npm\node_modules\npm-registry-client\lib\get.js:167:7)
npm ERR! at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "node" "D:\\Program Files (x86)\\npm\\1.4.28\\node_modules\\npm\\bin\\npm-cli.js" "install" "--ignore-scripts"
npm ERR! cwd D:\home\site\repository
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code E405
D:\home\site\repository\projectx.csproj(25,5): error MSB3073: The command "npm install --ignore-scripts" exited with code 1.
Failed exitCode=1, command=dotnet publish "D:\home\site\repository\projectx.csproj" --output "D:\local\Temp\8d65c86f4c7808a" --configuration Release
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\79.11121.3655\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
Anybody who has a idea? The project runs fine on my computer.
According to your error information, your issue was caused by the incorrect Node version obviously. The one of the prerequisites of GitHub repo you used is NodeJS >= 8.9.4, but now it's v0.10.40 on your Azure WebApp. As you said, the WEBSITE_NODE_DEFAULT_VERSION setting has beed added, but it seems not work.
I followed the document to add the same setting and click Save on Azure portal as the figure below, then immediately my kudu console restarted and check my node & npm version which be correct.
So my suggestion is:
Please check your WEBSITE_NODE_DEFAULT_VERSION setting whether be added in the correct field.
You can try to restart your Azure WebApp manually to make the change works.

error pngquant-bin with npm install

I installing npm and all works until this error, I am trying to discover what its causing this problem but no success. After the installation I tried to run 'npm run dev' but with errors too. I guess because the problem with the npm install at all. I tried to install the module pngquant-bin but no success too.
If you know a way or you face this same problem already, please help me. I see the other questions about it but with any responses. Please.
pngquant-bin#4.0.0 postinstall /var/www/html/futebit/node_modules/pngquant-bin
node lib/install.js
⚠ The `/var/www/html/futebit/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant pre-build test passed successfully
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (/var/www/html/futebit/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin#4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin#4.0.0 postinstall 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! /root/.npm/_logs/2018-07-16T14_17_27_195Z-debug.log
Pngquant require vcruntime140.dll.
Download and install 64bit and 32bit Visual C++ Redistributable for Visual Studio 2015 from https://www.microsoft.com/en-in/download/details.aspx?id=48145
The error states make sure that libpng-dev is installed. That means that you are probably missing that package.
On Debian/Ubuntu you can fix it with sudo apt install libpng-dev. That worked for me.
It seems you are trying to use the precompiled binary pngquant-bin and it fails because of incompatible libraries used in the OS, so two ways to use them:
Install system-wide pngquant package apart the node package
If you are using an old OS try upgrade the libraries then install the node package again
In case you have the newest OS, try upgrade the node package to the newest version too.

What is npm ERR! code ELIFECYCLE?

I've gotten this same error on two different npm packages and haven't seemed to be able to figure it out. I've checked this answer and I don't have any other servers running. I've also tried deleting my module_packages folder, cleaning npm cache clean and then reinstalling using npm i as many threads have suggested, but I still get the same error.
Windows 10 64bit
Node 8.9.4
npm 5.6.0
C:\Users\hunter\Documents\vid>npm install npm install github:storj/node-libstorj --save
> storj#5.1.0 preinstall C:\Users\hunter\Documents\vid\node_modules\storj
> node ./download.js
Unable to download libstorj for platform: win32 and arch: x64
npm WARN vid#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! storj#5.1.0 preinstall: `node ./download.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the storj#5.1.0 preinstall 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\hunter\AppData\Roaming\npm-cache\_logs\2018-03-25T15_44_06_578Z-debug.log
Any ideas on what might be causing the error would be helpful.
I have good and bad news for you. The good news first: Everythings fine with your computer.
The bad news: The module you would like to install is incompatible with windows operating systems. Have a look at the first line of your error message:
Unable to download libstorj for platform: win32 and arch: x64
There is already an open issue for this problem on GitHub, see: https://github.com/Storj/node-libstorj/issues/43
As mentioned in this issue there are multiple problems:
download/unzip not working
not compiling because some linux-only functions being used (access function)
not linking (it seems nettle and some other link fails)
So you have two options: Wait until this issue gets fixed - or - switch your operating system ;-)
I was getting a "code ELIFECYCLE" error trying to run "usemin" and "imagemin" node-modules via script entries in package.json. These script entries were given in a Coursera "Full Stack Developer" course:
"imagemin": "imagemin img/* -o dist/img/ &&
"usemin": "usemin index.html -d dist -o dist/index.html",
The first line should have read:
"imagemin": "imagemin --out-dir=dist/img/ img/**/*.{png,jpg,git}"
And the issue with usemin giving a "code ELIFECYLE" error was finally traced to the fact that I had installed the API version ("npm install usemin") rather than the cli version ("npm install usemin-cli).
Hope the above helps some other nubbie avoid what now look like an obvious pair of mistakes!

Sails.js missing modules

Experiencing npm module troubles using sails.js.
The first problem was - the contents of assets/ was not being replicated to .tmp/public as documentation indicates. There have been other errors as well.
Research has shown - there are missing modules, one of which is grunt. Doing a
npm install grunt
does make the .tmp/public start working.
But there have been other errors when trying to use the framework.
Install Details:
Server instance: Ubuntu 14.04.1 LTS
(recently deployed, no other changes to server except for node and sails.js)
node --version
v0.12.4
(built from sources)
npm -v
2.10.1
sails --version
0.11.0
sails installed using:
sudo npm install sails -g
Create a new application:
sails new testproject
cd testproject
npm list
produces a long list of missing npm modules to stderr:
npm ERR! missing: colors#~0.6.2, required by grunt#0.4.2
npm ERR! missing: grunt#~0.4.0, required by grunt-contrib-clean#0.5.0
npm ERR! missing: lodash#~2.4.1, required by grunt-contrib-coffee#0.10.1
npm ERR! missing: grunt#~0.4.0, required by grunt-contrib-coffee#0.10.1
npm ERR! missing: grunt#~0.4.0, required by grunt-contrib-concat#0.3.0
npm ERR! missing: grunt#~0.4.0, required by grunt-contrib-copy#0.5.0
and several others.
This seems inexplicable - how could this (missing npm modules) be overlooked? I am new to node - and could have missed something.
Reviewing the getting started page, I didn't notice anything obvious.
This framework seems well-designed - uses some great npm modules.
Has anybody experienced these and found what is needed to fix?
To resolve the missing: colors#~0.6.2, required by grunt#0.4.2 , just navigate to the node_modules/grunt, do a npm install to install the missing dependencies.

Resources