Closed OliverJAsh closed 3 years ago
I have not used workspaces. Probably needs a different way to detect yarn.
Exit code: 1
Command: node postinstall.js
Arguments:
Directory: …/node_modules/full-icu
Output:
npm install icu4c-data@62l (Node 10.15.3 and small-icu 62.1) -> icudt62l.dat
Looks like you are using yarn…
full-icu$ …/node …/node_modules/yarn/bin/yarn.js add icu4c-data@62l --no-lockfile --ignore-scripts
yarn add v1.16.0
error An unexpected error occurred: "Cannot read property 'manifest' of undefined".
info If you think this is a bug, please open a bug report with the information provided in "…/node_modules/full-icu/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
…/node_modules/full-icu/install-spawn.js:41
throw(Error(cmdPath + ' ' + args.join(' ') + ' --> status ' + spawned.status));
^
With workspaces, the monorepo only has a single lockfile, not sure if that is the problem though? But the problem seems yarn related…
Still having the same issue on yarn add -D full-icu
:
error <FULL_PATH>\node_modules\full-icu: Command failed.
Exit code: 1
Command: node postinstall.js
Arguments:
Directory: C:\Users\Andret\PhpstormProjects\mfpkis\node_modules\full-icu
Output:
npm install icu4c-data@67l (Node 12.18.0 and small-icu 67.1) -> icudt67l.dat
Looks like you are using yarn…
full-icu$ C:\Program Files\nodejs\node.exe C:\Program Files (x86)\Yarn\bin\yarn.js add icu4c-data@67l --no-lockfile --ignore-scripts
yarn add v1.22.4
info No lockfile found.
[1/4] Resolving packages...
info There appears to be trouble with the npm registry (returned undefined). Retrying...
info There appears to be trouble with the npm registry (returned undefined). Retrying...
info There appears to be trouble with the npm registry (returned undefined). Retrying...
info There appears to be trouble with the npm registry (returned undefined). Retrying...
C:\Program Files (x86)\Yarn\lib\cli.js:66073
throw new (_errors || _load_errors()).ResponseError(_this3.reporter.lang('requestFailed', description), res.statusCode);
^
ResponseError: Request failed "503 Service Unavailable"
at ResponseError.ExtendableBuiltin (C:\Program Files (x86)\Yarn\lib\cli.js:696:66)
at new ResponseError (C:\Program Files (x86)\Yarn\lib\cli.js:802:124)
at Request.params.callback [as _callback] (C:\Program Files (x86)\Yarn\lib\cli.js:66073:19)
at Request.self.callback (C:\Program Files (x86)\Yarn\lib\cli.js:140748:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:141720:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:141642:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22) {
responseCode: 503
}
C:\Users\Andret\PhpstormProjects\mfpkis\node_modules\full-icu\install-spawn.js:62
throw(Error(cmdPath + ' ' + args.join(' ') + ' --> status ' + spawned.status));
^
Error: C:\Program Files\nodejs\node.exe C:\Program Files (x86)\Yarn\bin\yarn.js add icu4c-data@67l --no-lockfile --ignore-scripts --> status 1
at npmInstallNpm (C:\Users\Andret\PhpstormProjects\mfpkis\node_modules\full-icu\install-spawn.js:62:9)
at Object.<anonymous> (C:\Users\Andret\PhpstormProjects\mfpkis\node_modules\full-icu\postinstall.js:72:2)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
yarn 2 and workspaces is a completely different world in some ways. For example, the node_modules folder is largely gone.. only necessary for certain packages that are not yet converted to work with yarn 2 world.. most notably, from my understanding full-icu is relying on postinstall and yarn 2 has issues with it (https://yarnpkg.com/advanced/lifecycle-scripts#a-note-about-postinstall). We are probably going to stop using full-icu unfortunately.. I've been mulling it over about how to leverage it without having to choose between the 2. My current thought was to use full-icu in the environment but not as part of my package.json install probably. It could be in a parent package outside the workspace maybe.. tbd...
fixed by https://github.com/nodejs/full-icu-npm/issues/38 no longer trying to do a sub install
When using yarn workspaces to install this package, I get an error. This is similar to https://github.com/unicode-org/full-icu-npm/issues/9.
As a workaround, if I
cd
to the workspace and run:it works.