Trouble Installing "mobius-client-js" - node.js

Keep failing to install mobius-client-js"
C:\WINDOWS\system32>yarn add #mobius-network/mobius-client-js
yarn add v1.12.3
[1/4] Resolving packages...
[2/4] Fetching packages...
error #mobius-network/mobius-client-js#0.5.0: The engine "node" is incompatible with this module. Expected version ">=4 <=9". Got "10.14.1"
error Found incompatible module
Per Yarn's docs, you can use the following methods to add:
You can also specify packages from different locations:
yarn add package-name installs the package from the npm registry
unless you have specified another one in your package.json.
yarn add file:/path/to/local/folder installs a package that is on
your local file system. This is useful to test out other packages of
yours that haven’t been published to the registry.
yarn add file:/path/to/local/tarball.tgz installs a package from a
gzipped tarball which could be used to share a package before
publishing it.
yarn add <git remote url> installs a package from a remote git
repository.
yarn add <git remote url>#<branch/commit/tag> installs a package from
a remote git repository at specific git branch, git commit or git tag.
yarn add https://my-project.org/package.tgz installs a package from a
remote gzipped tarball.
None are working... any help would be amazing.

As per your error message:
The engine "node" is incompatible with this module. Expected version ">=4 <=9". Got "10.14.1"
It looks like you are running NodeJS 10.14.1, but the mobius-client requires a NodeJS version between 4 and 9. You should either check if there's a compatible version of this library or use something like nvm to switch to a previous version of node.

Related

Yarn install package from npm and not workspace

I'm encountering a problem with yarn workspaces, here is my situation :
I have a monorepo that contains :
a packages folder containing npm packages
an apps folder containing nodejs apps
In one of my apps, I'm trying to install a package from my packages folder that is published in npm, but when I do yarn install, it keeps using the workspace folder and doesn't download the npm package nor updates the yarn lock.
How can I tell yarn to not use the workspace folder for install but download it from the remote? I'm using the workspaces only for local builds.
If you are using yarn berry, it looks up the package in your workspace first and remote registry after. This behavior can be changed by setting enableTransparentWorkspaces: false in your .yarnrc.yml file at root.
// .yarnrc.yml
enableTransparentWorkspaces: false
...
If you want to get a package from your workspace with the above option is set, you should explicitly add workspace: protocol as a prefix for your package name in your package.json.
"my-package": "workspace:^2.0.17",
See more at:
https://yarnpkg.com/configuration/yarnrc#enableTransparentWorkspaces
https://yarnpkg.com/features/protocols
if it is yarn 2+ (berry) you can use npm protocol
but I have some issue with it

Error while building maven project s4hana cloud sdk

with RELEASE version mentioned in archeType its giving this error
Execution default of goal
com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:2.19.1:usage-analytics
failed: Plugin com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:2.19.1
or one of its dependencies could not be resolved: Failed to collect
dependencies at
com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:jar:2.19.1 ->
com.sap.cloud.s4hana.plugins:usage-analytics:jar:2.19.2-SNAPSHOT
at the time of mvn clean install
This error hints at a problem with your local Maven repository, which seems to contain a newer SNAPSHOT version.
Either use mvn clean install -U to force an update of dependencies, or delete your local .m2 folder to download dependencies again.

Is there anything that can keep track of my installed npm packages and restore them on a different dev environment ? (like "Restore NuGet packages")

So I'm new to node/npm packages. Here's the scenario.
I installed all the dependencies on an environment.
Pushed the code to a remote repo
Pulled the code to a different dev environment.
Tried to restore all the previously installed dependencies
automatically but couldn't figure out a way.
I worked with NuGet packages before. I was expecting something similar to the behavior of "Restore NuGet Packages".
I've looked into my packages.json file but they don't list the later installed dependencies like packages.config file would do in case of NuGet. So is there anything similar? or am a missing something?
The package.json file is doing what you are looking for. Installing a dependency with --save option will add it to the package.json dependency list. On another environment you can install same dependencies with running npm install command.
Install a dependency for the first time: npm install newpackage --save
Push the package.json to the repo
Pull the repo
Install all dependencies which listed in package.json file by running npm install command in the directory which package.json reside

npm install not working in laravel 5.6

On a fresh install of laravel 5.6 via composer
How I installed it:
composer create-project laravel/laravel
After installing I ran:
npm install
I get back:
npm notice created a lockfile as package-lock.json. You should commit this file. Up to date in 0.163s.
It does not create a node_modules folder.
If I try using yarn to install the dependencies using:
yarn install
I get back:
yarn install v1.3.2 info No lockfile found. Resolving packages... warning laravel-mix > img-loader > imagemin-mozjpeg > mozjpeg > bin-wrapper > download > gulp-decompress > gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidlines at https://medium.com/gulpjs/gulp-util-ca3b1f9fac5 | Fetching packages... info fsevents#1.1.3: The platform 'win32' is incompatible with this module. info "fsevents#1.1.3" is an optional dependency and failed compatability check. Excluding it from installation. Linking dependencies.... Building fresh packages... success Saved lockfile. Done in 35.38s
This creates a node_modules folder with only ".yarn-integrity' no modules.
The link to the medium page doesn't work, receive 404 so no luck there.
My node version is: "v8.9.4" and my yarn version is: 'v1.3.2'
Edit: This isn't a git issue. I'm not using git
running:
npm install --dev or npm install --only=dev
This installed the dependencies I needed. For whatever reason in laravel 5.6 all the dependencies are considered devDependencies in the package.json file.
package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json. It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates.
Run the following command
git add -A
git commit -m "Commit package-lock.json"
git push -u origin master
Now re-run npm install
Just make sure you are in your project directory e.g
1) cd path/to/my_laravel_project
2) npm install
this because you are not in laravel root folder, when you create a project, at first you are not in folder you need to open your project folder and use
npm i

npm install on cleaned project does not 'update'

I have the following scenario:
project with installed node_modules
work directory is emptied
project is freshly cloned from git
npm install is run
I have a dependency required as ~1.0.0 in package.json. This dependency was previously installed in version 1.0.1. It has now newer versions, e.g. 1.0.2, available but still gets installed as 1.0.1 by npm install. But I want the dependency to get updated within the range that I specified.
Why is that and how could I solve this? Would using npm update instead/ afterwards help?
BR
Chris

Resources