Getting error when install ionic in linux mint - ionic-framework

I have tried a lot. But getting the same error when i tried to install Ionic.
I have tried this command
sudo ionic start lottery-app tabs --type=angular
And getting this error. Even i tried with Sudo. But still getting the same permission issue.
gyp verb build dir attempting to create "build" dir: /var/www/html/ionic/lottery-app/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/var/www/html/ionic/lottery-app/node_modules/node-sass/build'
gyp ERR! System Linux 4.8.0-53-generic
gyp ERR! command "/usr/local/bin/node" "/var/www/html/ionic/lottery-app/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/html/ionic/lottery-app/node_modules/node-sass
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
and after that how can i run this like mobile App by Android SDK.Please help me i am totally new in it. thanks in advance.

i was also getting many error while install it in ubuntu
try this script i found online on github this install ionic perfectly
click here

Related

Unable to install p5.serialserver on a mac

I have been trying to install p5.serial server on a mac for 2 days to no avail.
I have tried everything I can think of to try and download p5.serialserver on a mac. I used all three methods suggested in the documentation (https://github.com/p5-serial/p5.serialport) which were
clone the repository and run
npm install
This failed when I ran npm install and I was not able to proceed to the next step. Then I tried
sudo npm install -g p5.serialserver
and
npm install p5.serialserver
It keeps giving me errors that 3 arguments are required, but 2 were provided like below:
npm ERR! /path/path/path/node-gyp/17.4.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
Then the following:
npm ERR! ^
npm ERR! 4 errors generated.
npm ERR! make: *** [Release/obj.target/bindings/src/serialport.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/path/path/path/.nvm/versions/node/v17.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.1.0
npm ERR! gyp ERR! command "/path/path/path/.nvm/versions/node/v17.4.0/bin/node" "/path/path/path/.nvm/versions/node/v17.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /path/path/path/.nvm/versions/node/v17.4.0/lib/node_modules/p5.serialserver/node_modules/#serialport/bindings
npm ERR! gyp ERR! node -v v17.4.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
I assume this is because there are updated required and some of the packages required have changed, but I'm not sure which packages or how to resolve this. I tried downgrading the version of node I was using, but that did not work. If anyone has any more suggestions please inform.
Update: I ran p5.serialserver at https://npm.runkit.com/p5.serialserver.
It gave more errors based on what is in the module. Does that mean that it is not possible to use? Errors linked here: https://runkit.com/embed/9rlymlps3vcx
I have finally figured this out after a professor sent resources to explain the error. Basically, you need to download to nodev12.20.2 in order to use p5 serial (probably because of outdated dependencies)
I did this by running the following in the terminal. You can use nvm to run different versions of node, so I suggest using it to install node if you didn't already:
nvm install 12.20.2
nvm use 12.20.2
node -v
Confirm that the terminal is running node v12.20.2
sudo npm install serialport --unsafe-perm -g
sudo npm install ws -g
sudo npm install p5.serialserver --unsafe-perm -g
Then just run the following to start the server:
p5serial
And it should start the server. Hope this helps someone else because this was driving me crazy.

Running subprocess npm get me a error when creating ionic project

I just get this error when I try to lunch a new project on ionic 2.
I got a mkdir error, even by running the command on sudo, I use mac os.
I tried reinstall node, cordovan npm, tried to make some update, and googled the problem but can't find a solution.
Please help me, I'm an ionic beginner.
The error:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/Loic/appIonic/swipeCard/test/node_modules/node-sass/build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/Users/Loic/appIonic/swipeCard/test/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/Loic/appIonic/swipeCard/test/node_modules/node-sass
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.9.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! /Users/Loic/.npm/_logs/2018-09-22T16_45_54_600Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Thank
Try clearing the npm cache at C:\Users\\AppData\Roaming\npm-cache\
I was not using ionic for like six months. When i came back they asked me to update ionic to the latest version. After the update i can't even start a new project. So after wasting sometime i just downgraded to ionic 3.20.0 using the command
npm install -g cordova ionic#3.20.0
and now it's working fine

sails command not working in windows8 instead it opens notepad with some script

Here are my prompt command logs from when it was installed on my system:
C:\Users\shiva.namburu>npm install sails -g
\
sails#0.11.2 preinstall C:\Users\shiva.namburu\AppData\Roaming\npm\node_module
s\sails
node ./lib/preinstall_npmcheck.js
Sails.js Installation: Checking npm-version successful
npm WARN deprecated grunt-lib-contrib#0.7.1: DEPRECATED. See readme: https://git
hub.com/gruntjs/grunt-lib-contrib
bufferutil#1.2.1 install C:\Users\shiva.namburu\AppData\Roaming\npm\node_modul
es\sails\node_modules\sails-hook-sockets\node_modules\socket.io\node_modules\eng
ine.io\node_modules\ws\node_modules\bufferutil
node-gyp rebuild
-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node
modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\n
odejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gy
p.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sail
s-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_modules\ws\no
de_modules\bufferutil\build\bufferutil.vcxproj(20,3): error MSB4019: The import
ed project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the pat
h in the declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node
modules\sails-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_mo
dules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
utf-8-validate#1.2.1 install C:\Users\shiva.namburu\AppData\Roaming\npm\node_m
odules\sails\node_modules\sails-hook-sockets\node_modules\socket.io\node_modules
\engine.io\node_modules\ws\node_modules\utf-8-validate
node-gyp rebuild
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sails
-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node
modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Fil
es\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\nod
e-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sail
s-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_modules\ws\no
de_modules\utf-8-validate\build\validation.vcxproj(20,3): error MSB4019: The im
ported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the
path in the declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node
modules\sails-hook-sockets\node_modules\socket.io\node_modules\engine.io\node_mo
dules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil#1.2.1
utf-8-validate#1.2.1 install C:\Users\shiva.namburu\AppData\Roaming\npm\node_m
odules\sails\node_modules\sails-hook-sockets\node_modules\socket.io-client\node_
modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate
node-gyp rebuild
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sails
-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "
C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\no
de-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sail
s-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-client\node
modules\ws\node_modules\utf-8-validate\build\validation.vcxproj(20,3): error M
SB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Co
nfirm that the path in the declaration is correct, and that the file e
xists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node
modules\sails-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-
client\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
bufferutil#1.2.1 install C:\Users\shiva.namburu\AppData\Roaming\npm\node_modul
es\sails\node_modules\sails-hook-sockets\node_modules\socket.io-client\node_modu
les\engine.io-client\node_modules\ws\node_modules\bufferutil
node-gyp rebuild
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sails
-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-client\node_m
odules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\P
rogram Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-g
yp\bin\node-gyp.js" rebuild ) else (node rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node_modules\sail
s-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-client\node
modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj(20,3): error MSB40
19: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confir
m that the path in the declaration is correct, and that the file exist
s on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\shiva.namburu\AppData\Roaming\npm\node_modules\sails\node
modules\sails-hook-sockets\node_modules\socket.io-client\node_modules\engine.io-
client\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate#1.2.1
npm WARN optional dep failed, continuing bufferutil#1.2.1
Even if I clear the cache with the npm clear cache command, the problem remains the same.
How I can install sails globally?
You have issue with compiling native modules.
Install build tools and run install again.
You can read more about this here - https://github.com/nodejs/node-gyp#installation

Errors installing Karma on Mac OS 10.8.5

When I run npm install karma --save-dev, most of the installation goes well, but I get the following errors:
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 12.6.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Volumes/myProject/node_modules/karma/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
> bufferutil#1.1.0 install /Volumes/myProject/node_modules/karma/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
child_process: customFds option is deprecated, use stdio instead.
Error: Can't run /Applications/Xcode.app/usr/bin/xcodebuild (no such file).
Error: Can't run /Applications/Xcode.app/usr/bin/xcodebuild (no such file).
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
I have XCode Version 5.1.1 (5B1008) installed at /Applications/Xcode.app/, but when I Show Contents on the file, it shows a folder named Contents, and no usr directory.
What suggestions can you give to get gyp to install?

"Error: not found: make" installing Meteorite on OS X

I'm trying to install meteorite on OS X 10.8.4. When I run this
sudo -H npm install -g meteorite
I see
ws#0.4.27 install /usr/local/share/npm/lib/node_modules/meteorite/node_modules/ddp/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)
Looking at the builderror.log I see
gyp http GET http://nodejs.org/dist/v0.10.15/node-v0.10.15.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.15/node-v0.10.15.tar.gz
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/Cellar/node/0.10.10/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/local/Cellar/node/0.10.10/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/local/Cellar/node/0.10.10/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (fs.js:107:15)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.10/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/share/npm/lib/node_modules/meteorite/node_modules/ddp/node_modules/ws
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
What could be the problem?
Do you have the native build tools installed? If not, install them. This can be done using Xcode very easily. In the Xcode "Downloads" preference window.
Here's what appears to be your exact issue on another package: https://github.com/JustinTulloss/zeromq.node/issues/142
Assuming "install the command line tools" is the answer, in Xcode 5.1.1, xcode-select --install was not yet available. Here's how you do it in Xcode 5.1.1 (also works with older versions)
Applications
Xcode (Launch the IDE from your Apps)
Xcode Preferences menu (Top left, next to Apple logo)
Downloads tab
Components: Command Line Tools
Install (Download Arrow)