Node dependency/permission errors when installing expo-cli - node.js

I am trying to install expo to use react native, using npm install -g expo-cli but I get huge error logs.
I tried to chown /usr/local using sudo chown -R $(whoami) $(brew --prefix)/* /usr/local and sudo chown -R $USER /usr/local but I get chown: /usr/local: Operation not permitted. I tried updating node and npm, deleting them, reinstalling them, updating with homebrew, installing expo-cli with homebrew. I tried sudo installing. I get similar errors. I tried yarn add global expo-cli and I got almost the exact same output that I got from npm install -g expo-cli about the dependencies.
Here's the output I get in terminal from running npm install -g expo-cli:
npm WARN deprecated joi#11.4.0: 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 hoek#4.2.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).
npm WARN deprecated topo#2.0.2: 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 hoek#6.1.3: This module has moved and is now available at #hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated topo#3.0.3: This module has moved and is now available at #hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN #expo/dev-tools#0.5.14 requires a peer of #expo/xdl#^53.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
When I try to use yarn add I get the same errors about dependencies but instead of the "npm ERR!" part I get:
[2/4] đźšš Fetching packages...
info #expo/traveling-fastlane-linux#1.9.4: The platform "darwin" is incompatible with this module.
info "#expo/traveling-fastlane-linux#1.9.4" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-darwin-ia32#2.2.8: The CPU architecture "x64" is incompatible with this module.
info "#expo/ngrok-bin-darwin-ia32#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-arm#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-linux-arm#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-arm#2.2.8: The CPU architecture "x64" is incompatible with this module.
info #expo/ngrok-bin-linux-arm64#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-linux-arm64#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-arm64#2.2.8: The CPU architecture "x64" is incompatible with this module.
info #expo/ngrok-bin-freebsd-x64#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-freebsd-x64#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-freebsd-ia32#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-freebsd-ia32#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-freebsd-ia32#2.2.8: The CPU architecture "x64" is incompatible with this module.
info #expo/ngrok-bin-linux-x64#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-linux-x64#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-sunos-x64#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-sunos-x64#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-win32-ia32#2.2.8-beta.1: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-win32-ia32#2.2.8-beta.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-win32-ia32#2.2.8-beta.1: The CPU architecture "x64" is incompatible with this module.
info #expo/ngrok-bin-win32-x64#2.2.8-beta.1: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-win32-x64#2.2.8-beta.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-ia32#2.2.8: The platform "darwin" is incompatible with this module.
info "#expo/ngrok-bin-linux-ia32#2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info #expo/ngrok-bin-linux-ia32#2.2.8: The CPU architecture "x64" is incompatible with this module.
[3/4] đź”— Linking dependencies...
warning "expo-cli > #expo/dev-tools#0.5.14" has incorrect peer dependency "#expo/xdl#^53.8.0".
error An unexpected error occurred: "EACCES: permission denied, unlink '/Users/<username>/node_modules/.bin/detect-libc'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/<username>/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
When I run sudo npm install -g expo-cli I get the following:
npm WARN deprecated joi#14.0.4: 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 joi#11.4.0: 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 topo#2.0.2: 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 hoek#4.2.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).
npm WARN deprecated topo#3.0.3: This module has moved and is now available at #hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated hoek#6.1.3: This module has moved and is now available at #hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
> #expo/traveling-fastlane-darwin#1.9.4 preinstall /usr/local/lib/node_modules/expo-cli/node_modules/#expo/traveling-fastlane-darwin
> node platform.js
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:1077
path = process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Object.resolve (path.js:1077:24)
at startup (internal/bootstrap/node.js:269:32)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
/usr/local/bin/expo-cli -> /usr/local/lib/node_modules/expo-cli/bin/expo.js
/usr/local/bin/expo -> /usr/local/lib/node_modules/expo-cli/bin/expo.js
> fsevents#1.2.9 install /usr/local/lib/node_modules/expo-cli/node_modules/fsevents
> node install
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:1077
path = process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Object.resolve (path.js:1077:24)
at startup (internal/bootstrap/node.js:269:32)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
> iltorb#2.4.3 install /usr/local/lib/node_modules/expo-cli/node_modules/iltorb
> node ./scripts/install.js || node-gyp rebuild
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:1077
path = process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Object.resolve (path.js:1077:24)
at startup (internal/bootstrap/node.js:269:32)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
sh: node-gyp: command not found
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
> sharp#0.22.1 install /usr/local/lib/node_modules/expo-cli/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:1077
path = process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Object.resolve (path.js:1077:24)
at startup (internal/bootstrap/node.js:269:32)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
sh: node-gyp: command not found
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
npm WARN #expo/dev-tools#0.5.14 requires a peer of #expo/xdl#^53.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/traveling-fastlane-linux#1.9.4 (node_modules/expo-cli/node_modules/#expo/traveling-fastlane-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/traveling-fastlane-linux#1.9.4: wanted {"os":"win32,linux","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-win32-x64#2.2.8-beta.1 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-win32-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-win32-x64#2.2.8-beta.1: wanted {"os":"win32","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-win32-ia32#2.2.8-beta.1 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-win32-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-win32-ia32#2.2.8-beta.1: wanted {"os":"win32","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-sunos-x64#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-sunos-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-sunos-x64#2.2.8: wanted {"os":"sunos","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-linux-x64#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-linux-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-linux-x64#2.2.8: wanted {"os":"linux","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-linux-ia32#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-linux-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-linux-ia32#2.2.8: wanted {"os":"linux","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-linux-arm64#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-linux-arm64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-linux-arm64#2.2.8: wanted {"os":"linux","arch":"arm64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-linux-arm#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-linux-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-linux-arm#2.2.8: wanted {"os":"linux","arch":"arm"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-freebsd-ia32#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-freebsd-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-freebsd-ia32#2.2.8: wanted {"os":"freebsd","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-freebsd-x64#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-freebsd-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-freebsd-x64#2.2.8: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/ngrok-bin-darwin-ia32#2.2.8 (node_modules/expo-cli/node_modules/#expo/ngrok-bin-darwin-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for #expo/ngrok-bin-darwin-ia32#2.2.8: wanted {"os":"darwin","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/traveling-fastlane-darwin#1.9.4 (node_modules/expo-cli/node_modules/#expo/traveling-fastlane-darwin):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: #expo/traveling-fastlane-darwin#1.9.4 preinstall: `node platform.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules/expo-cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iltorb#2.4.3 (node_modules/expo-cli/node_modules/iltorb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iltorb#2.4.3 install: `node ./scripts/install.js || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! sharp#0.22.1 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the sharp#0.22.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I expected the output to say something like expo installed ok but instead it gives me the error logs about dependencies and permissions.

You need to have super user access to install a package globally. Try:
sudo npm install -g expo-cli

You can use npx alternative of npm install.
I can't fix the error, but
$ npx expo init Awesomeproject
works.
The only disadvantage of using npx is taking more time than using preinstalled expo.
Try npx!

The best solution I found, as this is related to some new permissions controls in macOS is to use option 2 here: https://github.com/mixonic/docs.npmjs.com/blob/master/content/getting-started/fixing-npm-permissions.md
This changes your default home folder for global modules, which may require reinstallation of others when it’s time to update, but won’t affect those already installed.
Otherwise an unsafe method of doing it is:
sudo npm i -g --unsafe-perm expo-cli

Related

Got warnings while installing Eslint in Atom editor

I am using Atom editor for React native. I am trying to install eslint. But got some warnings while running npm install commannd.
Firstly I have install both linter-eslint and eslint packages in Atom.
I have created a file .eslintrc and put below piece of code
{
“extends”: “eslint-config-google”
}
I have run the command npm install --save-dev eslint-config-rallycoding from root level of my project. But got below warnings and eslint is not working as well.
npm WARN deprecated eslint-plugin-class-property#1.1.0: please use eslint-plugin-babel and babel/semi
npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN rollback Rolling back node-pre-gyp#0.12.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'D:\ReactNative\albums\node_modules\fsevents\node_modules'
npm WARN acorn-jsx#5.0.1 requires a peer of acorn#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsx-a11y#2.2.3 requires a peer of eslint#^2.10.2 || 3.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import#1.16.0 requires a peer of eslint#2.x - 3.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react#6.10.3 requires a peer of eslint#^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
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"})
I have also tried to uninstall packages and re-install them but its not working.

How to fix issue on "ng" not recognized in azure kudu environment in azure while deploying an angular webapp thru jenkins deploy

followed this article in creating an angular app to azure website. (https://passos.com.au/build-and-deploy-an-angular-app-from-github-to-azure-website/) but in my case, we used Jenkins to deploy it on the website. i used Jenkins plugin (Publish an Azure Web App).
Here is the error i get.
2019-01-10T05:32:25.3182021Z,The node.js application will run with the default node.js version 8.9.4.,,0
2019-01-10T05:32:25.3338146Z,Selected npm version 5.6.0,,0
2019-01-10T05:33:27.4200572Z,npm WARN #angular/animations#7.2.0 requires a peer of #angular/core#7.2.0 but none is installed. You must install peer dependencies yourself.,,1
2019-01-10T05:33:27.4380331Z,up to date in 59.495s,,0
2019-01-10T05:33:27.4380331Z,npm WARN angular-6-datatable#0.8.0 requires a peer of #angular/core#^6.0.0 but none is installed. You must install peer dependencies yourself.,,1
2019-01-10T05:33:27.4513060Z,npm WARN angular-6-datatable#0.8.0 requires a peer of #angular/common#^6.0.0 but none is installed. You must install peer dependencies yourself.,,1
2019-01-10T05:33:27.4689400Z,npm WARN angular-6-datatable#0.8.0 requires a peer of #angular/platform-browser#^6.0.0 but none is installed. You must install peer dependencies yourself.,,1
2019-01-10T05:33:27.4988320Z,npm WARN The package #angular/cli is included as both a dev and production dependency.,,1
2019-01-10T05:33:27.5138032Z,npm WARN The package #angular/compiler-cli is included as both a dev and production dependency.,,1
2019-01-10T05:33:27.5138032Z,Building App in D:\home\site\repository…,,0
2019-01-10T05:33:27.5294295Z,npm WARN The package typescript is included as both a dev and production dependency.,,1
2019-01-10T05:33:27.5606827Z,npm WARN The package svg2sprite-cli is included as both a dev and production dependency.,,1
2019-01-10T05:33:27.5763069Z,npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):,,1
2019-01-10T05:33:27.6075585Z,npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin"&comma;"arch":"any"} (current: {"os":"win32"&comma;"arch":"ia32"}),,1
2019-01-10T05:33:27.6253798Z,,,1
2019-01-10T05:33:29.2496514Z,,,0
2019-01-10T05:33:29.2638549Z,> SB-Admin-BS4-Angular-7#7.0.0 build D:\home\site\repository,,0
2019-01-10T05:33:29.2638549Z,> ng build --prod --aot,,0
2019-01-10T05:33:29.2951058Z,,,0
2019-01-10T05:33:29.4044879Z,'ng' is not recognized as an internal or external command&comma;,,1
2019-01-10T05:33:29.4201074Z,operable program or batch file.,,1
2019-01-10T05:33:29.4513736Z,npm ERR! code ELIFECYCLE,,1
2019-01-10T05:33:29.4669827Z,npm ERR! errno 1,,1
2019-01-10T05:33:29.4826098Z,Failed exitCode=1&comma; command="D:\Program Files (x86)\nodejs\8.9.4\node.exe" "D:\Program Files (x86)\npm\5.6.0\node_modules\npm\bin\npm-cli.js" run build,,0
2019-01-10T05:33:29.4826098Z,npm ERR! SB-Admin-BS4-Angular-7#7.0.0 build: `ng build --prod --aot`,,1
2019-01-10T05:33:29.4982327Z,An error has occurred during web site deployment.,,0
2019-01-10T05:33:29.5151098Z,npm ERR! Exit status 1,,1
2019-01-10T05:33:29.5294872Z,npm ERR! ,,1
2019-01-10T05:33:29.5294872Z,npm ERR! Failed at the SB-Admin-BS4-Angular-7#7.0.0 build script.,,1
2019-01-10T05:33:29.5607390Z,npm ERR! This is probably not a problem with npm. There is likely additional logging output above.,,1
2019-01-10T05:33:29.5763692Z,,,1
2019-01-10T05:33:29.5763692Z,npm ERR! A complete log of this run can be found in:,,1
2019-01-10T05:33:29.5919898Z,npm ERR! D:\local\AppData\npm-cache\_logs\2019-01-10T05_33_29_436Z-debug.log,,1
2019-01-10T05:33:29.5919898Z,The system cannot find the drive specified.,,1
2019-01-10T05:33:29.6232380Z,Missing server.js/app.js files&comma; web.config is not generated\r\nnpm WARN #angular/animations#7.2.0 requires a peer of #angular/core#7.2.0 but none is installed. You must install peer dependencies yourself.\r\nnpm WARN angular-6-datatable#0.8.0 requires a peer of #angular/core#^6.0.0 but none is installed. You must install peer dependencies yourself.\r\nnpm WARN angular-6-datatable#0.8.0 requires a peer of #angular/common#^6.0.0 but none is installed. You must install peer dependencies yourself.\r\nnpm WARN angular-6-datatable#0.8.0 requires a peer of #angular/platform-browser#^6.0.0 but none is installed. You must install peer dependencies yourself.\r\nnpm WARN The package #angular/cli is included as both a dev and production dependency.\r\nnpm WARN The package #angular/compiler-cli is included as both a dev and production dependency.\r\nnpm WARN The package typescript is included as both a dev and production dependency.\r\nnpm WARN The package svg2sprite-cli is included as both a dev and production dependency.\r\nnpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):\r\nnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin"&comma;"arch":"any"} (current: {"os":"win32"&comma;"arch":"ia32"})\r\n\r\n'ng' is not recognized as an internal or external command&comma;\r\noperable program or batch file.\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\nnpm ERR! SB-Admin-BS4-Angular-7#7.0.0 build: `ng build --prod --aot`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the SB-Admin-BS4-Angular-7#7.0.0 build script.\r\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR! D:\local\AppData\npm-cache\_logs\2019-01-10T05_33_29_436Z-debug.log\r\nThe system cannot find the drive specified.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\79.11121.3655\bin\Scripts\starter.cmd deploy.cmd,,2

Installed Angular Cli by (npm install -g #angular/cli) -- getting ng is not recognised as an external and internal command

C:\Users\neha>npm install -g #angular/cli
C:\Users\neha\AppData\Roaming\npm\ng -> C:\Users\neha\AppData\Roaming\npm\node_modules\#angular\cli\bin\ng
#angular/cli#6.0.8 postinstall C:\Users\neha\AppData\Roaming\npm\node_modules\#angular\cli
node ./bin/ng-update-message.js
npm WARN rollback Rolling back node-pre-gyp#0.10.0 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\neha\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\fsevents\node_modules'
npm WARN rollback Rolling back needle#2.2.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\neha\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\fsevents\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\#angular\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
#angular/cli#6.0.8
updated 1 package in 37.347s
C:\Users\neha>ng
'ng' is not recognized as an internal or external command,
operable program or batch file.
Just add %AppData%\npm; to the user variable(since %AppData% dir is depending on user) PATH to fix it.
Related issue on Github
You only need to link it to npm using npm link #angular/cli
that worked for me

Installed npm but command not found

I'm installing the following package on Linux Mint
https://github.com/frida/frida-compile
I try to install it by
~ $ sudo npm install frida-compile
npm WARN saveError ENOENT: no such file or directory, open '/home/david/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/david/package.json'
npm WARN david No description
npm WARN david No repository field.
npm WARN david No README data
npm WARN david No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ frida-compile#5.3.7
updated 1 package in 2.883s
[!] 2 vulnerabilities found [21344 packages audited]
Severity: 2 Low
Run `npm audit` for more detail
And when I run frida-compile on the command line, I get
frida-compile: command not found
Any idea what the issue is here?
I am running Node 8.11.1

When i try to install any module with npm i get this

npm WARN optional Skipping failed optional dependency /forever/forever-monitor/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
npm WARN embedly#0.3.2 No license field.
These are just warning so not critical fatal errors but should be paid attention to in order to prevent problems in the future.
npm WARN optional Skipping failed optional dependency /forever/forever-monitor/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.14
This is saying that fsevents has some optional dependencies that weren't installed. It's also saying that your architecture, most likely your operating system, isn't supported for this package.
npm WARN embedly#0.3.2 No license field.
The developer of this package didn't add a license field to the package.json file for the package. Not an error, not something you can fix, just something the developer of the package should add in at some point.

Resources