Re: [patch] Refactor: clipboard, translations, jasmine

From: Atira Odhner <aodhner(at)pivotal(dot)io>
To: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [patch] Refactor: clipboard, translations, jasmine
Date: 2017-03-14 20:16:37
Message-ID: CA+Vc24qWVT7JjPBws8+v6_QrFjac=7Ej8Goy9o-rMR4gPu9Ukw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Dave, try doing the yarn install and karma run from the web directory.
karma cli expects karma to be under node_modules where it is run from.
(which is where yarn will install it if you use yarn from the web
directory). Karma also needs to be run from the directory where karma.conf
is.

I've also re-attached the same patches since they were lost from the shared
thread.

Tira

On Tue, Mar 14, 2017 at 4:11 PM, Atira Odhner <aodhner(at)pivotal(dot)io> wrote:

> accidentally removed the group from this thread. adding them back.
>
> On Mon, Mar 13, 2017 at 7:08 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>> On Fri, Mar 10, 2017 at 4:53 PM, Atira Odhner <aodhner(at)pivotal(dot)io> wrote:
>> > We moved package.json, karma.conf, and node_modules under web. We'll
>> take a
>>
>> This doesn't work for me:
>>
>> ==========
>> (pgadmin4)piranha:web dpage$ sudo port install nodejs7 yarn
>> ---> Computing dependencies for nodejs7
>> ---> Fetching archive for nodejs7
>> ---> Attempting to fetch nodejs7-7.7.2_0.darwin_16.x86_64.tbz2 from
>> https://packages.macports.org/nodejs7
>> ---> Attempting to fetch nodejs7-7.7.2_0.darwin_16.x86_64.tbz2.rmd160
>> from https://packages.macports.org/nodejs7
>> ---> Installing nodejs7 @7.7.2_0
>> ---> Activating nodejs7 @7.7.2_0
>> ---> Cleaning nodejs7
>> ---> Computing dependencies for yarn
>> ---> Fetching archive for yarn
>> ---> Attempting to fetch yarn-0.21.3_0.darwin_16.noarch.tbz2 from
>> https://packages.macports.org/yarn
>> ---> Attempting to fetch yarn-0.21.3_0.darwin_16.noarch.tbz2.rmd160
>> from https://packages.macports.org/yarn
>> ---> Installing yarn @0.21.3_0
>> ---> Activating yarn @0.21.3_0
>> ---> Cleaning yarn
>> ---> Updating database of binaries
>> ---> Scanning binaries for linking errors
>> ---> No broken files found.
>> ---> Some of the ports you installed have notes:
>> yarn has the following notes:
>> yarn stores data in:
>>
>> ~/.yarn
>> ~/.yarnrc
>> ~/.cache/yarn
>> ~/.config/yarn
>>
>> Should you choose to install packages globally with yarn (yarn
>> global add), these files will not be removed if you deactivate or
>> uninstall yarn. By default, these packages
>> will be installed in ~/.config/yarn/global, and soft-linked to
>> /opt/local/bin. To uninstall them all:
>>
>> $ ls -1 $HOME/.config/yarn/global/node_modules/ | xargs sudo yarn
>> global remove
>>
>> You may then remove the directories listed above and uninstall yarn.
>>
>> yarn is meant to replace NPM, and may cause conflicts if you use both.
>>
>> You may override the default global installation directory by
>> setting the PREFIX environment variable, e.g.
>>
>> mkdir -p $HOME/.config/yarn/bin # Or wherever you want
>> export PREFIX=$HOME/.config/yarn/bin
>> export PATH=$PREFIX:$PATH
>> (pgadmin4)piranha:web dpage$ yarn
>> yarn install v0.21.3
>> info No lockfile found.
>> [1/4] 🔍 Resolving packages...
>> success Nothing to install.
>> success Saved lockfile.
>> ✨ Done in 0.17s.
>> (pgadmin4)piranha:web dpage$ sudo npm install -g karma-cli
>> /opt/local/bin/karma -> /opt/local/lib/node_modules/karma-cli/bin/karma
>> /opt/local/lib
>> └── karma-cli(at)1(dot)0(dot)1
>>
>> (pgadmin4)piranha:web dpage$ karma start --single-run
>> Cannot find local Karma!
>> Please install Karma by `npm install karma --save-dev`.
>> If you wanna use a global instance, please set NODE_PATH env variable.
>> ==========
>>
>> I tried setting NODE_PATH to various seemingly obvious values (e.g.
>> /opt/local, /opt/local/lib/node_modules) but it still wouldn't work.
>> Google is not helping.
>>
>> This also highlighted the fact that the README changes are specific to
>> homebrew on macOS only. At the very least they need to point out that
>> and that users may need to adapt to other commands on Linux/Windows or
>> if using MacPorts for example.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>

Attachment Content-Type Size
0001-Add-jasmine.patch application/octet-stream 8.1 KB
0002-Enable-refactoring-javascript-with-translations.patch application/octet-stream 6.3 KB
0003-Refactor-copying-text-to-clipboard-into-a-separate-f.patch application/octet-stream 8.3 KB
0004-Change-quotes-in-sqleditor-to-make-it-valid-js-indep.patch application/octet-stream 23.4 KB
0005-update-libraries.txt.patch application/octet-stream 6.8 KB
0006-fix-path-to-js-under-sources.patch application/octet-stream 2.5 KB
0007-Move-karma.conf-node_modules-into-web-javascript-tes.patch application/octet-stream 4.6 KB
0008-exclude-node_modules-from-exe-dmg-build-step.patch application/octet-stream 1.5 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Joao Pedro De Almeida Pereira 2017-03-14 22:08:47 [patch] Column selection on SQLEditor
Previous Message Atira Odhner 2017-03-14 20:11:08 Re: [patch] Refactor: clipboard, translations, jasmine