I use a default.nix
shell to work on a monorepo at work. I need to use node
12 and yarn
.
with import <nixpkgs> { };
stdenv.mkDerivation {
name = "stuart-frontend-dev-shell";
buildInputs = [
zlib
(yarn.override { nodejs = nodejs-12_x; })
];
shellHook = ''
yarn
'';
}
and it returns this error:
WARN Moving @babel/cli that was installed by a different package manager to "node_modules/.ignored
WARN Moving @babel/core that was installed by a different package manager to "node_modules/.ignored
WARN Moving @rollup/plugin-alias that was installed by a different package manager to "node_modules/.ignored
WARN Moving @rollup/plugin-babel that was installed by a different package manager to "node_modules/.ignored
WARN Moving @rollup/plugin-commonjs that was installed by a different package manager to "node_modules/.ignored
WARN 68 other warnings
WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
WARN deprecated intl-messageformat-parser@5.5.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
WARN deprecated @formatjs/intl-utils@3.8.4: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make anyfurther changes to this package
WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
WARN deprecated intl-messageformat-parser@5.5.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
WARN deprecated @formatjs/intl-utils@3.8.4: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make anyfurther changes to this package
WARN deprecated @formatjs/intl-utils@3.8.4: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make anyfurther changes to this package
WARN deprecated @formatjs/intl-utils@3.8.4: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make anyfurther changes to this package
WARN deprecated @formatjs/intl-utils@3.8.4: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make anyfurther changes to this package
WARN deprecated @formatjs/intl-utils@3.8.4: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make anyfurther changes to this package
WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
WARN deprecated har-validator@5.1.5: this library is no longer supported
WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
Packages: +2055
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 2057, reused 2055, downloaded 0, added 0, done
node_modules/.pnpm/core-js@3.22.0/node_modules/core-js: Running postinstall script, done in 74ms
node_modules/.pnpm/core-js-pure@3.22.0/node_modules/core-js-pure: Running postinstall script, done in 75ms
node_modules/.pnpm/cwebp-bin@5.1.0/node_modules/cwebp-bin: Running postinstall script...
node_modules/.pnpm/gifsicle@4.0.1/node_modules/gifsicle: Running postinstall script...
node_modules/.pnpm/husky@4.3.8/node_modules/husky: Running install script, done in 122ms
node_modules/.pnpm/mozjpeg@6.0.1/node_modules/mozjpeg: Running postinstall script...
node_modules/.pnpm/node-sass@4.14.1/node_modules/node-sass: Running install script, done in 240ms
node_modules/.pnpm/husky@4.3.8/node_modules/husky: Running postinstall script, done in 75ms
node_modules/.pnpm/optipng-bin@6.0.0/node_modules/optipng-bin: Running postinstall script, failed in 2.2s
.../node_modules/optipng-bin postinstall$ node lib/install.js
│ ⚠ spawn /home/marcel/clones/work/ui/node_modules/.pnpm/optipng-bin@6.0.0/node_modules/optipng-bin/vendor/optipng ENOENT
│ ⚠ optipng pre-build test failed
│ ℹ compiling from source
│ ✖ Error: Command failed: /bin/sh -c make install
│ pngrtran.c:99:1: warning: ‘png_rtran_ok’ defined but not used [-Wunused-function]
│ 99 | png_rtran_ok(png_structrp png_ptr, int need_IHDR)
│ | ^~~~~~~~~~~~
│ ar: `u' modifier ignored since `D' is the default (see `U')
│ /nix/store/cimp3vp40msz4afq1c3602p2rn9bff0d-binutils-2.35.2/bin/ld: pngtest.o: undefined reference to symbol 'stdout@@GLIBC_2.2.5'
│ /nix/store/cimp3vp40msz4afq1c3602p2rn9bff0d-binutils-2.35.2/bin/ld: /nix/store/6w8g7njm4mck5dmjxws0z1xnrxvl81xa-glibc-2.34-115/lib/libc.so.6: error adding symbols: DSO missing from command line
│ make[2]: *** [Makefile:66: pngtest] Error 1
│ make[1]: *** [Makefile:129: ../libpng/libpng.a] Error 2
│ make: *** [Makefile:14: install] Error 2
│ cd src/optipng && \
│ make install && \
│ cd ../..
│ make[1]: Entering directory '/run/user/1000/b7494102-1171-4338-9d39-9cb813b83231/src/optipng'
│ cd ../libpng && \
│ make -f Makefile PNGLIBCONF_H_PREBUILT=pnglibconf.h.optipng && \
│ cd ../optipng
│ make[2]: Entering directory '/run/user/1000/b7494102-1171-4338-9d39-9cb813b83231/src/libpng'
│ cp pnglibconf.h.optipng pnglibconf.h
│ gcc -c -I../zlib -O2 -Wall -Wextra -o png.o png.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngerror.o pngerror.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngget.o pngget.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngmem.o pngmem.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngpread.o pngpread.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngread.o pngread.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngrio.o pngrio.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngrtran.o pngrtran.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngrutil.o pngrutil.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngset.o pngset.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngtrans.o pngtrans.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngwio.o pngwio.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngwrite.o pngwrite.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngwtran.o pngwtran.c
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngwutil.o pngwutil.c
│ ar cru libpng.a png.o pngerror.o pngget.o pngmem.o pngpread.o pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
│ ranlib libpng.a
│ gcc -c -I../zlib -O2 -Wall -Wextra -o pngtest.o pngtest.c
│ ld -L../zlib -o pngtest pngtest.o libpng.a -lz -lm
│ make[2]: Leaving directory '/run/user/1000/b7494102-1171-4338-9d39-9cb813b83231/src/libpng'
│ make[1]: Leaving directory '/run/user/1000/b7494102-1171-4338-9d39-9cb813b83231/src/optipng'
│ at /home/marcel/clones/work/ui/node_modules/.pnpm/execa@0.7.0/node_modules/execa/index.js:231:11
│ at runMicrotasks (<anonymous>)
│ at processTicksAndRejections (internal/process/task_queues.js:95:5)
│ at async /home/marcel/clones/work/ui/node_modules/.pnpm/optipng-bin@6.0.0/node_modules/optipng-bin/lib/install.js:18:4
└─ Failed in 2.2s
node_modules/.pnpm/node-sass@4.14.1/node_modules/node-sass: Running postinstall script, done in 270ms
node_modules/.pnpm/pngquant-bin@5.0.2/node_modules/pngquant-bin: Running postinstall script, done in 487ms
ELIFECYCLE Command failed with exit code 1.