Windows npm installation error by github repo - windows

I tried to clone a github repo with the instructions given in the readme here.
If I do npm ci or npm i I get many errors:
npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated debug#3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated multicodec#1.0.4: This module has been superseded by the multiformats module
npm WARN deprecated uuid#2.0.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid#2.0.1: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multibase#0.6.1: This module has been superseded by the multiformats module
npm WARN deprecated multibase#0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated uuid#3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated multicodec#0.5.7: This module has been superseded by the multiformats module
npm WARN deprecated cids#0.7.5: This module has been superseded by the multiformats module
npm ERR! code 1
npm ERR! path C:\Users\danis\axelar-local-gmp-examples\node_modules\#axelar-network\axelar-cgp-aptos
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c C:\Users\danis\AppData\Local\Temp\postinstall-f5a513bd.cmd
npm ERR! > #axelar-network/axelar-cgp-aptos#1.0.2 build
npm ERR! > run-s build-aptos
npm ERR!
npm ERR!
npm ERR! > #axelar-network/axelar-cgp-aptos#1.0.2 build-aptos
npm ERR! > ./aptos/build.sh
npm ERR! Der Befehl "." ist entweder falsch geschrieben oder
npm ERR! konnte nicht gefunden werden.
npm ERR! ERROR: "build-aptos" exited with 1.
npm ERR! ERROR: "build" exited with 1.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\danis\AppData\Local\npm-cache\_logs\2023-01-27T14_25_45_549Z-debug-0.log
The bad thing is, after that I wanted to install npm i dotenv, what worked fine till now, but that also gives me an error looking quite similar.
Can someone help me solving this?
Thank you!!!

Related

Github action: npm install -> Error: Process completed with exit code 1

I have this GitHub action workflow that have been working for over a year. Suddenly I get error when I get to the step that runs 'npm install'. I really have no clue why the error is triggered. Would really appreciate someone helping or at least just pointing me in right direction. If you need some more data just tell me I will edit the question.
I have tried updating some packages and also the npm update command. But no good:
Run npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated core-js#2.6.12: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! make: Entering directory '/home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-sass/build'
npm ERR! g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-
(some more error message in between here but had to cut off due to too many characters)
npm ERR! remove_cv
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: note: suggested alternative: ‘remove_cv’
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~~~~~
npm ERR! remove_cv
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~
npm ERR! /home/runner/.node-gyp/16.13.1/include/node/v8-internal.h:492:63: note: suggested alternative: ‘herror’
npm ERR! !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
npm ERR! ^~~~~~~
npm ERR! herror
npm ERR! make: *** [Release/obj.target/binding/src/binding.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 (/home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.4.0-1064-azure
npm ERR! gyp ERR! command "/usr/local/bin/node" "/home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /home/runner/work/projsiteWebApp/projsiteWebApp/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-12-13T20_05_37_396Z-debug.log
Error: Process completed with exit code 1.
It looks like something in your project is using node-sass, which contains libsass which is deprecated
If it is a direct dependency, you can just switch over to Dart Sass, and things mostly should just work the same. If it is a transitive dependency that is requiring node-sass, you can try to update it by updating your direct dependencies that depend on it. Alternatively, if you're using yarn, you can try to change it with selective version resolutions
If you couldn't manage to switch to using dart-sass and have to deal with the C++ gyp build error, I would probably check to make sure that the particular version of node-sass you're using is compatible with the current c++ compiler you currently have installed. Maybe your compiler became too old because libsass (and in turn, node-sass) decided to up their language requirements?
Edit:
Try using this technique (since you are using npm) for resolving the node-sass that is inside vue-mj-daterangepicker to something else. You can change to a newer version or by using the "dart-sass" package. If you use the latter, g++ wouldn't error since dart-sass doesn't use c++. You could also use the "sass" package, since the sass and dart-sass npm pacakges are essentially the same
Maybe something like the following in your package.json... (not tested)
"resolutions": {
"node-sass": "https://registry.npmjs.org/node-sass/-/node-sass-7.0.0.tgz"
},
"scripts": {
"preinstall": "npx npm-force-resolutions"
}
or
"resolutions": {
"node-sass": "https://registry.npmjs.org/dart-sass/-/dart-sass-1.25.0.tgz"
},
"scripts": {
"preinstall": "npx npm-force-resolutions"
}
The reason that this is happening is because libsass seems to be set up to use the C++11 standard when it builds, but std::remove_cv_t was only introduced as part of the C++14 standard (I think some compilers like MSVC may have introduced it earlier than that). An easy fix is to set the CXXFLAGS environment variable before you run npm install. e.g. CXXFLAGS="--std=c++14" npm install

In terminal 'tns preview' command not working. (NativeScript)

I wanted to run my NS application in local. I downloaded project from play.nativescript.org, And I open cmd with target path and I followed this steps
Step 1. Install the latest NativeScript CLI
Type the following command in a Command Prompt or Terminal.
npm install -g nativescript#latest
and I have successfully installed the NativeScript CLI
Step 2. Preview your app
Navigate to your project folder and run the following command to start
previewing your app.
tns preview
When I entered the command I get this errors
You are using the deprecated nsconfig.json file. Just be aware that NativeScript 7 has an improved nativescript.config.(js|ts) file for when you're ready to upgrade this project.
npm WARN deprecated bfj-node4#5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request#2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! code E404
npm ERR! 404 Not Found - GET https://github.com/thomasconner/javascript/tarball/67b7944366453a87226389d483ac1ad861e0e129npm ERR! 404
npm ERR! 404 'pubnub#https://github.com/thomasconner/javascript/tarball/67b7944366453a87226389d483ac1ad861e0e129' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'kinvey-nativescript-sdk'
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\dotor\AppData\Roaming\npm-cache\_logs\2020-10-01T09_47_56_177Z-debug.log
Command npm.cmd failed with exit code 1
As in github.com therosko has written, making kinvey-nativescript-sdk version as 5.0.1 worked for me. Src: here
Unfortunately, play.nativescript.org exported projects won't run with nativescript version 7 and up.
Currently, the only solution would be to install {N} CLI using npm install -g nativescript#6.8.0

npm run watch on laravel 6 has many warning and errors

When I run npm install on Laravel 6
I get the following errors:
C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master>npm install
npm WARN deprecated babel-preset-es2015#6.24.1: � Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated fsevents#1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
npm WARN deprecated core-js#2.6.10: core-js#<3.0 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated hawk#3.1.3: This module moved to #hapi/hawk. Please make sure to switch over as this distribution is no longer supported
and may contain bugs and critical security issues.
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated cryptiles#2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp#1.0.9: This module moved to #hapi/sntp. Please make sure to switch over as this distribution is no longer supported
and may contain bugs and critical security issues.
npm WARN deprecated hoek#2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom#2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
> node-sass#4.13.0 postinstall C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master\node_modules\node-sass
> node scripts/build.js
Binary found at C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master\node_modules\node-sass\vendor\win32-x64-72\binding.node
Testing binary
Binary is fine
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":"win32","arch":"x64"})
added 1107 packages from 781 contributors and audited 14707 packages in 526.859s
found 21 vulnerabilities (2 low, 12 moderate, 7 high)
run `npm audit fix` to fix them, or `npm audit` for details
And after I run npm audit fix --force then npm run watch return following errors:
Error: Cannot find module 'C:\Users\Hamid\Desktop\LaravelChatApp-master\laravel-chat-master\node_modules\cross-env\bin\cross-env.js'
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:687:27)←[39m
←[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)←[39m
←[90m at internal/main/run_main_module.js:17:11←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # watch: `node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # watch 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\Hamid\AppData\Roaming\npm-cache\_logs\2019-12-02T05_33_19_426Z-debug.log
I also cleared the npm cache several times and reinstall npm but problem not solve

Hyperledger Composer Installation

I have tried installed hyper ledger composer CLI & its development tools but got errors. like the
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated constantinople#3.0.2: Please update to at least constantinople 3.1.1
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated socks#1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated mailcomposer#4.0.1: This project is unmaintained
npm WARN deprecated buildmail#4.0.1: This project is unmaintained
/root/.nvm/versions/node/v8.10.0/bin/composer -> /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/cli.js
pkcs11js#1.0.14 install /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/node_modules/pkcs11js
node-gyp rebuild
sh: 1: node-gyp: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! pkcs11js#1.0.14 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.14 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:
npm ERR! /root/.npm/_logs/2018-03-24T02_16_27_676Z-debug.log
root#Composer:~# npm install -g composer-rest-server
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated constantinople#3.0.2: Please update to at least constantinople 3.1.1
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailcomposer#4.0.1: This project is unmaintained
npm WARN deprecated socks#1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated buildmail#4.0.1: This project is unmaintained
/root/.nvm/versions/node/v8.10.0/bin/composer-rest-server -> /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-rest-server/cli.js
pkcs11js#1.0.14 install /root/.nvm/versions/node/v8.10.0/lib/node_modules/composer-rest-server/node_modules/pkcs11js
node-gyp rebuild
sh: 1: node-gyp: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! pkcs11js#1.0.14 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.14 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:
npm ERR! /root/.npm/_logs/2018-03-24T02_16_58_032Z-debug.log
root#Composer:~# npm install -g generator-hyperledger-composer
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated formatio#1.2.0: This package is unmaintained. Use #sinonjs/formatio instead
pkcs11js#1.0.14 install /root/.nvm/versions/node/v8.10.0/lib/node_modules/generator-hyperledger-composer/node_modules/pkcs11js
node-gyp rebuild
sh: 1: node-gyp: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! pkcs11js#1.0.14 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.14 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:
npm ERR! /root/.npm/_logs/2018-03-24T02_17_21_569Z-debug.log
Whats the best way or single line command to install the composer on ubuntu ?
the i tried to install the cli as sudo user : got this error :
i tried to install the composer cli as sudo user: got this : "swap#composer:~$ npm install -g composer-cli
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated constantinople#3.0.2: Please update to at least constantinople 3.1.1
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated socks#1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated mailcomposer#4.0.1: This project is unmaintained
npm WARN deprecated buildmail#4.0.1: This project is unmaintained
/home/swap/.nvm/versions/node/v8.10.0/bin/composer -> /home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/cli.js
pkcs11js#1.0.14 install /home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/node_modules/pkcs11js
node-gyp rebuild
Traceback (most recent call last):
File "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/gyp_main.py", line 13, in
import gyp
File "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 8, in
import gyp.input
File "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 5, in
from compiler.ast import Const
ImportError: No module named compiler.ast
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.4.0-109-generic
gyp ERR! command "/home/swap/.nvm/versions/node/v8.10.0/bin/node" "/home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/swap/.nvm/versions/node/v8.10.0/lib/node_modules/composer-cli/node_modules/pkcs11js
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pkcs11js#1.0.14 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pkcs11js#1.0.14 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
"
please guide
I would run a npm update and take a look at this two links:
https://hyperledger.github.io/composer/installing/installing-prereqs
and
https://hyperledger.github.io/composer/reference/commands.html
Read with care about the requisites.
And I also notice the information:
Please note: When using Ubuntu this command will fail when running in a root user shell.

Error installing Composer on Ubuntu

I am trying to install Composer on Ubuntu 14.04. I was able to install the prerequisites. When installing composer, I get the following error. How to fix it?
npm install -g composer-cli
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
/root/.nvm/versions/node/v6.11.2/bin/composer -> /root/.nvm/versions/node/v6.11.2/lib/node_modules/composer-cli/cli.js
> hashtable#2.0.2 install /root/.nvm/versions/node/v6.11.2/lib/node_modules/composer-cli/node_modules/hashtable
> node-gyp configure build
sh: 1: node-gyp: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! hashtable#2.0.2 install: `node-gyp configure build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the hashtable#2.0.2 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:
npm ERR! /root/.npm/_logs/2017-08-22T16_31_22_412Z-debug.log
So firstly you should not install Hyperledger Composer as 'root'. You need to read the docs here before you proceed https://hyperledger.github.io/composer/installing/development-tools.html
So fundamentally this is an npm issue (in that it causes problems for npm, when you npm install as 'root' or 'sudo' privileges for installing modules).
I suggest you create a non-root user in your Ubuntu system. Then log in as that user. Then install the pre-reqs using the supplied prereqs-ubuntu.sh script from the link above. Then follow the instructions, installing as your non-privileged user.
Normal route to fixing a non-root install npm issue, is one of these shown here https://docs.npmjs.com/getting-started/fixing-npm-permissions
When you install composer modules globally (eg. composer-cli) you should install using a designated, non-root user as mentioned. If there are issues (eg, on Ubuntu with permissions to write/update node directories located in system directories like /usr/local) - one solution (but see link earlier) is perform the npm install to a directory you have access to - rather than resort to root or superuser access, as this is not good practice. Here is what to do to set the npm prefix to a given directory, ...
"npm config set prefix /home/myuser/"
In this case, global binaries are placed in /home/myuser/bin which is in your PATH, and the modules are placed in /home/myuser/lib ...

Resources