-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best way to install current master modules while waiting for a release? #2229
Comments
Clearly annoying and did not find a simple solution. One approach below that works. Not closing as I would expect a simpler solution than my own solution if possible. How to build local Turf packages from masterFirst consoleGet code git clone https://github.com/Turfjs/turf.git
cd turf Create branch and switch to it (6.6.0 because at time of writing current version is 6.5.0) git checkout -b v6.6.0 Follow partly release recipe (https://github.com/Turfjs/turf/blob/master/CONTRIBUTING.md#release) yarn lerna version --no-push --no-commit-hooks 6.6.0 In a 2nd consoleInstall a local registry using verdaccio npm i verdaccio -g
verdaccio Do not kill the console as you need verdaccio running In the first consoleCreate a new user (registry empty) with the following and type your username, password and mail npm adduser --registry http://localhost:4873 Login to local registry (type same info as the one you choose above) npm login --registry http://localhost:4873 Change registry url with the following (or edit sed -i 's#https://registry.npmjs.org#http://localhost:4873#g' lerna.json
git add -u
git commit -m "Update registry for lerna local tests" Publish to local registry yarn lerna publish --ignore-scripts from-package Install new version from your local registry and you're done npm i @turf/turf --registry http://localhost:4873 Confirm installed version is 6.6.0
To get tgz files list you usually get infos from packages in the registry, do
Retrieve the tgz files
If you want to install from the tgz files from the local registry, do
Reuse packagesFor end-users (that do not have verdaccio installed), download the attached zip file that contains all tgz from last steps. Unzip the dir in your project
Test it works
|
Ref #1720, just for the records |
@ThomasG77 doesn't seem like an simpler solution has appeared, so have promoted your instructions to a wiki page - https://github.com/Turfjs/turf/wiki/Contributing#deploy-to-a-local-node-registry Thanks for putting them together. Will close this issue as understand the original problem was fixed in #1720 |
Please provide the following when reporting an issue:
This question is related to the following issue
When I run
and
It works. However, when I do,
It throws the following
The error is thrown due to line https://github.com/Turfjs/turf/blob/v6.5.0/packages/turf-line-chunk/index.js#L28 where we test
helpers.isObject(options)
. While inspecting theisObject
function e.g https://github.com/Turfjs/turf/blob/v6.5.0/packages/turf-helpers/index.ts#L765-L767 we see the followinginput.constructor === Object
is false becauseinput.constructor
value is[Function: Object]
In master, e.g below code (visible also at https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/index.ts#L765-L767), we've seen the function has been changed and if changed manually in version 6.5 module (excepting the js/ts syntax differences), the previous failing command line works
Trying to install current Turf master version instead of v6.5.0 with
It failed. I also didn't see any prelease at https://www.npmjs.com/package/@turf/turf.
So, what did I miss to install locally all modules from master to a third party code repository that also use Node.js?
The text was updated successfully, but these errors were encountered: