Issues installing Sails on Ubuntu && node v.4 - javascript

I was wondering if anyone else has had problems installing sails in ubuntú vps with node v.4.
Thanks,
Marcos
root#marcoscorreia:/# sudo npm install sails
|
sails#0.11.0 preinstall /node_modules/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://github.com/gruntjs/grunt-lib-contrib
utf-8-validate#1.1.0 install /node_modules/sails/node_modules/sails-hook-
sockets/node_mod/socket.io/node_modules/engine.io/node_modules/ws/node_modu > les/utf-8-validate
node-gyp rebuild

Related

Unhandled exception occurred running ng serve

I'm not sure what it means or how to fix it. I just got a new machine and before I pulled down my repo, I installed the latest node, Angular Cli, npm and any other package/framework needed by my app. I cloned the repo and updated all local packages in my project to current versions using npm-check-updates. I then installed the updated packages with >npm install -force to resolve a couple of peer dependency issues. I'll post a screen shoot at the very bottom. But now ng serve doesn't run see error below. Not sure why?
➜ client git:(master) ✗ ng serve
⠋ Generating browser application bundles (phase: setup)...An unhandled exception occurred: Dev-server address info is not defined.
See "/private/var/folders/l6/zz0rl4793838rf924b4y0tqc0000gn/T/ng-5kND02/angular-errors.log" for further details.
➜ client git:(master) ✗
The error in the index.js file is from this below.
const devServer = createWebpackDevServer(webpackCompiler, devServerConfig);
devServer.startCallback(() => {
var _a;
const address = (_a = devServer.server) === null || _a === void 0 ? void 0 : _a.address();
if (!address) {
obs.error(new Error(`Dev-server address info is not defined.`));
return;
}
result = {
success: true,
port: typeof address === 'string' ? 0 : address.port,
family: typeof address === 'string' ? '' : address.family,
address: typeof address === 'string' ? address : address.address,
};
});
>npm install -force
➜ client git:(master) ✗ npm install -f
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: ngx-gallery-9#1.0.6
npm WARN Found: tslib#2.3.1
npm WARN node_modules/tslib
npm WARN tslib#"^2.3.1" from the root project
npm WARN 22 more (#angular-devkit/build-angular, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer tslib#"^1.10.0" from ngx-gallery-9#1.0.6
npm WARN node_modules/ngx-gallery-9
npm WARN ngx-gallery-9#"^1.0.6" from the root project
npm WARN
npm WARN Conflicting peer dependency: tslib#1.14.1
npm WARN node_modules/tslib
npm WARN peer tslib#"^1.10.0" from ngx-gallery-9#1.0.6
npm WARN node_modules/ngx-gallery-9
npm WARN ngx-gallery-9#"^1.0.6" from the root project
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated source-map-resolve#0.6.0: See https://github.com/lydell/source-map-resolve#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 request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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 tslint#6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
added 1163 packages, and audited 1164 packages in 37s
118 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
I then installed the updated packages with npm install -force to resolve a couple of peer dependency issues.
Did you actually manually resolve all the issues or think that the command above would do it for you?
My guess is that the dependencies are not installed properly, but I can be wrong.
You might want to try the solution I just posted npm not installing unable to resolve dependency tree. I also included the link in the post for further troubleshooting.
This might be due to the old version of the node.
Kindly update your node version to the latest then run the following command.
sudo n lts
Then run the following command.
ng run serve
This might help you

unable to install vue on macos using npm

there are a few steps:
Use node v10+ instead of v14+.
(IMPT) add the following path to ~/.zshrc (if you are using zsh)
/Users/[yourUsername]/.npm-packages/bin
/Users/[yourUsername]/.npm-global/bin
run source ~/.zshrc after modifying the file.
Much thanks to #kissu and #Lakindu Hewawasam !!
-------original question-------
I'm on MacOS 10.15.5, node version v14.15.4, npm version 6.14.10.
I've been getting the error zsh: command not found: vue, after trying multiple ways to download Vue.
I first tried npm install -g #vue/cli, and it was giving me this error, so I uninstalled and tried again with sudo npm install -g #vue/cli #vue/cli-init --unsafe-perm referring to this. Still, it doesn't work:
yingjieqiao#Yingjies-MacBook-Pro ~ % sudo npm install -g #vue/cli #vue/cli-init --unsafe-perm
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
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 vue-cli#2.9.6: This package has been deprecated in favour of #vue/cli
npm WARN deprecated coffee-script#1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
> yarn#1.22.10 preinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)
/Users/yingjieqiao/.npm-global/bin/vue -> /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/bin/vue.js
> fsevents#1.2.13 install /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/fsevents
> node install.js
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
> core-js#3.8.2 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> #apollo/protobufjs#1.0.5 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/#apollo/protobufjs
> node scripts/postinstall
> nodemon#1.19.4 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/nodemon
> node bin/postinstall || exit 0
> ejs#2.7.4 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/ejs
> node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm WARN #vue/compiler-sfc#3.0.5 requires a peer of vue#3.0.5 but none is installed. You must install peer dependencies yourself.
+ #vue/cli#4.5.9
+ #vue/cli-init#4.5.9
added 1367 packages from 714 contributors and updated 1 package in 43.692s
yingjieqiao#Yingjies-MacBook-Pro ~ % vue --version
zsh: command not found: vue
yingjieqiao#Yingjies-MacBook-Pro ~ % npm update -g #vue/cli
yingjieqiao#Yingjies-MacBook-Pro ~ % vue --version
zsh: command not found: vue
yingjieqiao#Yingjies-MacBook-Pro ~ %
In the warning message, it mentioned "xxx package will break on node v14+" a few times. But I think the download command in the official docs should work regardless?
Looking for the comments just below the other answer, you may try adding those
export PATH="$PATH:$(yarn global bin)"
export PATH="$PATH:$HOME/.npm-global/bin"
to your ~/.zshrc file since vue-cli is properly installed apparently.
Ofc, source ~/.zshrc before trying to call the CLI again.
In my experience the node version 10.23.0 works best for myself. So I recommend using this because I have solved errors like this using the version 10.23.0.
Download here: https://nodejs.org/dist/latest-v10.x/
And then, once you have this version of node installed, run the command $ npm install vue
You should not install any package w/ a sudo prefix.
How is your node version installed btw, via nvm or manually ?
Maybe try to install it w/ yarn.
Best idea would probably be to rollback and try to debug the issues on the recommended way. Maybe digging into specific issues on the github repo.
Btw, the post you're referencing is an old one so things probably changed in between.
I'm on Linux running the following versions (#vue/cli 4.5.9 is fine too, just upgraded).
EDIT: Also, this post may maybe help somehow.

I am trying to create a react app using the "npx/npm create-react-app hello" command and got this whole message

when I run the following command to create a react app:
C:\WINDOWS\system32> npm i create-react-app -g hello
I get the following message in cmd:
npm WARN deprecated hello-config#1.0.1: Use #hello/config instead
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.
C:\Users\Simran Shivani\AppData\Roaming\npm\create-react-app -> C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\create-react-app\index.js
C:\Users\Simran Shivani\AppData\Roaming\npm\hello -> C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\hello\cli\index.js
> core-js#2.6.11 postinstall C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\hello\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> ejs#2.7.4 postinstall C:\Users\Simran Shivani\AppData\Roaming\npm\node_modules\hello\node_modules\ejs
> node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm WARN glob-promise#3.4.0 requires a peer of glob#* but none is installed. You must install peer dependencies yourself.
+ create-react-app#3.4.1
+ hello#0.3.2
added 379 packages from 242 contributors in 152.381s
What am I doing wrong?
Your command tries to install the packages create-react-app and hello globally, If you are using npm 5.2 or later there is no reason to install create-react-app globally.
Use the recommended command to create your app instead,
npx create-react-app my-app
This command will get the latest version of create-react-app and generate your project inside a folder name my-app in your current working directory without installing create-react-app globally.
Then you can change the working directory to my-app and start the development server by running the command npm start.
You can refer to the docs for more details.

Troubles with Angular CLI installing

I have installed node (v 8.5.0) with npm (5.3.0).
After that I made: npm install -g #angular/cli but it doesn't work:
ng help
-bash: ng: command not found
here are installation logs:
MacBook-Air:~ michael$ npm install -g #angular/cli
/Users/michael/.npm-global/bin/ng -> /Users/michael/.npm-global/lib/node_modules/#angular/cli/bin/ng
+ #angular/cli#1.4.3
updated 1 package in 39.276s
You can check out this issue on github.
It seems like they are running npm install again possibly needing admin privileges as well.

npm: not found when setting up Jenkins Server?

This is my first time setting up a jenkins server. The build is using Amazon's EC2 and Ubuntu 14.04.
I've installed node and npm via nvm.
node -v
>v0.11.14
npm -v
>2.0.0
The repo pulls down just fine into my /var/lib/jenkins/workspace/morningharwood folder.
Problem: When I add my script it breaks
Here's my build script which errors out? I have no idea what i'm doing. I copied this from a tutorial.
QUESTION: How do I properly write my script to npm install, bower install and lastly, grunt test
You could install node, npm, bower and grunt by doing following:
sudo apt-get install node
sudo npm install bower
sudo npm install grunt
To install a package from local source, use
npm install /path
Try using NodeJS plugin for Jenkins: https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin
This will solve npm command not found issue on jenkins even installed on server
sudo mkdir /usr/local/nvm
export NVM_DIR=/usr/local/nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh |NVM_DIR=/usr/local/nvm bash
. /usr/local/nvm/nvm.sh
nvm install 10.15.3 -g
npm install #angular/cli -g
Include following on build execute shell command in jenkins:
export PATH="$PATH:/usr/local/nvm/versions/node/v10.15.3/bin"
npm install

Categories