Closed bernd-wechner closed 2 years ago
I ran it again with tracing just to get closer to what's happening:
$ sudo bash -x joplin-build.sh
[sudo] password for cirrus:
+ cd /home/joplin
+ rm -f package-lock.json package.json
+ cp joplin/package-lock.json joplin/package.json ./
+ npm install --ignore-scripts
up to date, audited 1586 packages in 46s
90 packages are looking for funding
run `npm fund` for details
69 vulnerabilities (31 moderate, 38 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
+ rm -rf packages
+ mkdir packages
+ rsync -r joplin/packages/fork-sax/package-lock.json joplin/packages/fork-sax/package.json ./packages/fork-sax/
+ rsync -r joplin/packages/htmlpack/package-lock.json joplin/packages/htmlpack/package.json ./packages/htmlpack/
+ rsync -r joplin/packages/renderer/package-lock.json joplin/packages/renderer/package.json ./packages/renderer/
+ rsync -r joplin/packages/tools/package-lock.json joplin/packages/tools/package.json ./packages/tools/
+ rsync -r joplin/packages/lib/package-lock.json joplin/packages/lib/package.json ./packages/lib/
+ rsync -r joplin/lerna.json .
+ rsync -r joplin/tsconfig.json .
+ rsync -r joplin/packages/turndown/ ./packages/turndown/
+ rsync -r joplin/packages/turndown-plugin-gfm/ ./packages/turndown-plugin-gfm/
+ rsync -r joplin/packages/fork-htmlparser2/ ./packages/fork-htmlparser2/
+ npm run bootstrap
> bootstrap
> lerna bootstrap --force-local --no-ci
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 8 packages
lerna info Installing external dependencies
lerna ERR!
lerna ERR! lerna EACCES: permission denied, rename '/home/joplin/packages/fork-htmlparser2/package.json' -> '/home/joplin/packages/fork-htmlparser2/package.json.lerna_backup'
+ rsync -r joplin/packages/server/package-lock.json joplin/packages/server/package.json ./packages/server/
+ npm run bootstrapServerOnly
> bootstrapServerOnly
> lerna bootstrap --force-local --no-ci --include-dependents --include-dependencies --scope @joplin/server
lerna notice cli v3.22.1
lerna info versioning independent
lerna notice filter including "@joplin/server"
lerna notice filter including dependents
lerna notice filter including dependencies
lerna info filter [ '@joplin/server' ]
lerna info Bootstrapping 9 packages
lerna info Installing external dependencies
lerna ERR!
lerna ERR! lerna EACCES: permission denied, rename '/home/joplin/packages/fork-htmlparser2/package.json' -> '/home/joplin/packages/fork-htmlparser2/package.json.lerna_backup'
+ rsync -r joplin/packages/fork-sax/ ./packages/fork-sax/
+ rsync -r joplin/packages/htmlpack/ ./packages/htmlpack/
+ rsync -r joplin/packages/renderer/ ./packages/renderer/
+ rsync -r joplin/packages/tools/ ./packages/tools/
+ rsync -r joplin/packages/lib/ ./packages/lib/
+ rsync -r joplin/packages/server/ ./packages/server/
+ npm run build
> build
> lerna run build && npm run tsc
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 4 packages: "npm run build"
lerna ERR! npm run build exited 127 in '@joplin/turndown-plugin-gfm'
lerna ERR! npm run build stdout:
> @joplin/turndown-plugin-gfm@1.0.42 build
> rollup -c config/rollup.config.cjs.js
lerna ERR! npm run build stderr:
glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/root/.npm/_logs'
}
sh: 1: rollup: not found
lerna ERR! npm run build exited 127 in '@joplin/turndown-plugin-gfm'
lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.
And some experimentation and file system examination later, it works.
There is some bizarre thing going on in that npm drops root status quietly when it runs it seems, downgrades itself. Total novelty to me that. So if you run with sudo
it no go. But sudo -u joplin
and all good! Well worth documenting. I'll PR that soon.
$ sudo -u joplin bash -x joplin-build.sh
+ cd /home/joplin
+ rm -f package-lock.json package.json
+ cp joplin/package-lock.json joplin/package.json ./
+ npm install --ignore-scripts
up to date, audited 1586 packages in 40s
90 packages are looking for funding
run `npm fund` for details
69 vulnerabilities (31 moderate, 38 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
+ rm -rf packages
+ mkdir packages
+ rsync -r joplin/packages/fork-sax/package-lock.json joplin/packages/fork-sax/package.json ./packages/fork-sax/
+ rsync -r joplin/packages/htmlpack/package-lock.json joplin/packages/htmlpack/package.json ./packages/htmlpack/
+ rsync -r joplin/packages/renderer/package-lock.json joplin/packages/renderer/package.json ./packages/renderer/
+ rsync -r joplin/packages/tools/package-lock.json joplin/packages/tools/package.json ./packages/tools/
+ rsync -r joplin/packages/lib/package-lock.json joplin/packages/lib/package.json ./packages/lib/
+ rsync -r joplin/lerna.json .
+ rsync -r joplin/tsconfig.json .
+ rsync -r joplin/packages/turndown/ ./packages/turndown/
+ rsync -r joplin/packages/turndown-plugin-gfm/ ./packages/turndown-plugin-gfm/
+ rsync -r joplin/packages/fork-htmlparser2/ ./packages/fork-htmlparser2/
+ npm run bootstrap
> bootstrap
> lerna bootstrap --force-local --no-ci
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 8 packages
lerna info Installing external dependencies
lerna info Symlinking packages and binaries
lerna info lifecycle @joplin/fork-htmlparser2@4.1.38~prepare: @joplin/fork-htmlparser2@4.1.38
lerna info lifecycle @joplin/turndown-plugin-gfm@1.0.42~prepare: @joplin/turndown-plugin-gfm@1.0.42
lerna info lifecycle @joplin/turndown@4.0.60~prepare: @joplin/turndown@4.0.60
> @joplin/fork-htmlparser2@4.1.38 prepare /home/joplin/packages/fork-htmlparser2
> npm run build
> @joplin/fork-htmlparser2@4.1.38 build
> tsc
> @joplin/turndown-plugin-gfm@1.0.42 prepare /home/joplin/packages/turndown-plugin-gfm
> npm run build
> @joplin/turndown-plugin-gfm@1.0.42 build
> rollup -c config/rollup.config.cjs.js
src/gfm.js → lib/turndown-plugin-gfm.cjs.js...
created lib/turndown-plugin-gfm.cjs.js in 64ms
> @joplin/turndown@4.0.60 prepare /home/joplin/packages/turndown
> npm run build
> @joplin/turndown@4.0.60 build
> rollup -c config/rollup.config.cjs.js
src/turndown.js → lib/turndown.cjs.js...
created lib/turndown.cjs.js in 314ms
lerna success Bootstrapped 8 packages
+ rsync -r joplin/packages/server/package-lock.json joplin/packages/server/package.json ./packages/server/
+ npm run bootstrapServerOnly
> bootstrapServerOnly
> lerna bootstrap --force-local --no-ci --include-dependents --include-dependencies --scope @joplin/server
lerna notice cli v3.22.1
lerna info versioning independent
lerna notice filter including "@joplin/server"
lerna notice filter including dependents
lerna notice filter including dependencies
lerna info filter [ '@joplin/server' ]
lerna info Bootstrapping 9 packages
lerna info Installing external dependencies
lerna info Symlinking packages and binaries
lerna info lifecycle @joplin/fork-htmlparser2@4.1.38~prepare: @joplin/fork-htmlparser2@4.1.38
lerna info lifecycle @joplin/turndown@4.0.60~prepare: @joplin/turndown@4.0.60
lerna info lifecycle @joplin/turndown-plugin-gfm@1.0.42~prepare: @joplin/turndown-plugin-gfm@1.0.42
> @joplin/fork-htmlparser2@4.1.38 prepare /home/joplin/packages/fork-htmlparser2
> npm run build
> @joplin/fork-htmlparser2@4.1.38 build
> tsc
> @joplin/turndown-plugin-gfm@1.0.42 prepare /home/joplin/packages/turndown-plugin-gfm
> npm run build
> @joplin/turndown-plugin-gfm@1.0.42 build
> rollup -c config/rollup.config.cjs.js
src/gfm.js → lib/turndown-plugin-gfm.cjs.js...
created lib/turndown-plugin-gfm.cjs.js in 63ms
> @joplin/turndown@4.0.60 prepare /home/joplin/packages/turndown
> npm run build
> @joplin/turndown@4.0.60 build
> rollup -c config/rollup.config.cjs.js
src/turndown.js → lib/turndown.cjs.js...
created lib/turndown.cjs.js in 314ms
lerna success Bootstrapped 9 packages
+ rsync -r joplin/packages/fork-sax/ ./packages/fork-sax/
+ rsync -r joplin/packages/htmlpack/ ./packages/htmlpack/
+ rsync -r joplin/packages/renderer/ ./packages/renderer/
+ rsync -r joplin/packages/tools/ ./packages/tools/
+ rsync -r joplin/packages/lib/ ./packages/lib/
+ rsync -r joplin/packages/server/ ./packages/server/
+ npm run build
> build
> lerna run build && npm run tsc
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 4 packages: "npm run build"
lerna info run Ran npm script 'build' in '@joplin/turndown-plugin-gfm' in 1.1s:
> @joplin/turndown-plugin-gfm@1.0.42 build
> rollup -c config/rollup.config.cjs.js
lerna info run Ran npm script 'build' in '@joplin/server' in 1.5s:
> @joplin/server@2.6.14 build
> gulp build
[20:04:37] Using gulpfile ~/packages/server/gulpfile.js
[20:04:37] Starting 'build'...
[20:04:37] Starting 'compilePackageInfo'...
Warning: Could not get git info (it will not be displayed in About dialog box)
Generated /home/joplin/packages/server/dist/packageInfo.js
[20:04:37] Finished 'compilePackageInfo' after 40 ms
[20:04:37] Finished 'build' after 44 ms
lerna info run Ran npm script 'build' in '@joplin/turndown' in 1.8s:
> @joplin/turndown@4.0.60 build
> rollup -c config/rollup.config.cjs.js
lerna info run Ran npm script 'build' in '@joplin/fork-htmlparser2' in 10.2s:
> @joplin/fork-htmlparser2@4.1.38 build
> tsc
lerna success run Ran npm script 'build' in 4 packages in 10.3s:
lerna success - @joplin/fork-htmlparser2
lerna success - @joplin/server
lerna success - @joplin/turndown-plugin-gfm
lerna success - @joplin/turndown
> tsc
> lerna run tsc --stream --parallel
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 5 packages: "npm run tsc"
@joplin/tools: > @joplin/tools@2.6.2 tsc
@joplin/tools: > tsc --project tsconfig.json
@joplin/lib: > @joplin/lib@2.6.2 tsc
@joplin/lib: > node node_modules/typescript/bin/tsc --project tsconfig.json
@joplin/renderer: > @joplin/renderer@2.6.2 tsc
@joplin/renderer: > node node_modules/typescript/bin/tsc --project tsconfig.json
@joplin/server: > @joplin/server@2.6.14 tsc
@joplin/server: > tsc --project tsconfig.json
@joplin/htmlpack: > @joplin/htmlpack@2.6.0 tsc
@joplin/htmlpack: > tsc --project tsconfig.json
lerna success run Ran npm script 'tsc' in 5 packages in 28.8s:
lerna success - @joplin/htmlpack
lerna success - @joplin/lib
lerna success - @joplin/renderer
lerna success - @joplin/server
lerna success - @joplin/tools
Following the README. I first did:
sudo bashjoplin-requirements.sh
and that worked well. Then progressed to the build:
Not sure what
lerna
is and why there are permission denied errors when run as root. Any tips appreciated.