Npm i in root errors out

With the current dev HEAD (0c6780562), I get the following error when doing a npm i:

Error: Cannot find module '@joplin/tools/tool-utils'
Require stack:
- /Users/tessus/data/work/joplin/packages/app-mobile/tools/prepareRelease.js
- /Users/tessus/data/work/joplin/packages/app-mobile/gulpfile.js
- /Users/tessus/data/work/joplin/packages/app-mobile/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js
- /Users/tessus/data/work/joplin/packages/app-mobile/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /Users/tessus/data/work/joplin/packages/app-mobile/node_modules/gulp/node_modules/gulp-cli/index.js
- /Users/tessus/data/work/joplin/packages/app-mobile/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/tessus/data/work/joplin/packages/app-mobile/tools/prepareRelease.js:7:50)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/tessus/data/work/joplin/packages/app-mobile/tools/prepareRelease.js',
    '/Users/tessus/data/work/joplin/packages/app-mobile/gulpfile.js',
    '/Users/tessus/data/work/joplin/packages/app-mobile/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js',
    '/Users/tessus/data/work/joplin/packages/app-mobile/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js',
    '/Users/tessus/data/work/joplin/packages/app-mobile/node_modules/gulp/node_modules/gulp-cli/index.js',
    '/Users/tessus/data/work/joplin/packages/app-mobile/node_modules/gulp/bin/gulp.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @joplin/app-mobile@0.8.9 build: `gulp build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @joplin/app-mobile@0.8.9 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/tessus/.npm/_logs/2021-01-18T19_24_17_742Z-debug.log
lerna info lifecycle @joplin/app-mobile@0.8.9~postinstall: Failed to exec postinstall script
lerna ERR! lifecycle "postinstall" errored in "@joplin/app-mobile", exiting 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@ bootstrap: `lerna bootstrap --no-ci`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the root@ bootstrap script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/tessus/.npm/_logs/2021-01-18T19_24_17_813Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! root@ postinstall: `npm run bootstrap --no-ci && npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the root@ postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Thanks for the info, it should be fixed now.

1 Like

Yep, with 9c718baf6 npm i runs w/o an error.

The bug was due to a commit that happened today, and your issue was opened yesterday. So, no, not the same thing.

Don’t know what's your point, I know what I’m doing and I know I’ve introduced a bug today, which tessus reported and I’ve then fixed. I know what bug it was, how it was fixed. And that was all after you’ve posted your issue, so again: unrelated.

But anyway i’m done here. You’re free to think whatever you want to think.