plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[nativescript/localize] It cannot be installed in a site where there is no NS

Open vallemar opened this issue 4 years ago • 1 comments
trafficstars

I want to install it in a monorepo package outside the NS app but it gives an error when trying to install, I think it would be nice to be able to accept this

npm ERR! code 1
npm ERR! path C:\wordspaces\ns\monorepo\packages\core\core-native\node_modules\@nativescript\localize
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node postinstall
npm ERR! node:internal/modules/cjs/loader:936
npm ERR!   throw err;
npm ERR!   ^
npm ERR!
npm ERR! Error: Cannot find module '@nativescript/hook'
npm ERR! Require stack:
npm ERR! - C:\wordspaces\ns\monorepo\packages\core\core-native\node_modules\@nativescript\localize\postinstall.js
npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR!     at require (node:internal/modules/cjs/helpers:94:18)
npm ERR!     at Object.<anonymous> (C:\wordspaces\ns\monorepo\packages\core\core-native\node_modules\@nativescript\localize\postinstall.js:1:1)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: [
npm ERR!     'C:\\wordspaces\\ns\\monorepo\\packages\\core\\core-native\\node_modules\\@nativescript\\localize\\postinstall.js'
npm ERR!   ]
npm ERR! }

vallemar avatar Sep 24 '21 16:09 vallemar

Good example why we should re-think hooks, partially related to this discussion: https://github.com/NativeScript/nativescript-cli/issues/5576

rigor789 avatar Sep 24 '21 16:09 rigor789