Hi,
I’ve installed drone CI in my macbook and trying to create an CI for our nodejs based projects. I have the following .drone.yml file for building a reactjs project.
---
kind: pipeline
type: exec
name: default
platform:
os: darwin
arch: amd64
steps:
- name: build
commands:
- npm install
- npm build
environment:
NODE_ENV: production
- name: test
commands:
- npm install
- npm build
- npm test
But the NPM install command fails and here is the error that I get.
+ git init
2 hint: Using 'master' as the name for the initial branch. This default branch name
3 hint: is subject to change. To configure the initial branch name to use in all
4 hint: of your new repositories, which will suppress this warning, call:
5 hint:
6 hint: git config --global init.defaultBranch <name>
7 hint:
8 hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
9 hint: 'development'. The just-created branch can be renamed via this command:
10 hint:
11 hint: git branch -m <name>
12
13 Initialized empty Git repository in /private/var/folders/b8/z_h6cxwj0dgg7gh659qdwnz40000gn/T/drone-NdlZgsprmhlic1eJ/drone/src/.git/
14 + git remote add origin https://bitbucket.org/Manivannan-Venkatesan/ui.git
15 + git fetch origin +refs/heads/master:
16 From https://bitbucket.org/Manivannan-Venkatesan/ui
17 * branch master -> FETCH_HEAD
18
19 * [new branch] master -> origin/master
20 + git checkout 283b40abb06a95f6f720383fba5fbc12ba4feaa6 -b master
21 Already on 'master'
2 npm
3 WARN deprecated
4 babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
5 npm WARN
6 deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
7 npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
8 npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
9 npm WARN deprecated
10 fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
11 npm 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.
12 npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
13 npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
14 npm WARN deprecated
15 @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
16 npm WARN
17 deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
18 npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
19 npm
20 WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
21 npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
22
23 > fsevents@1.2.13 install /private/var/folders/b8/z_h6cxwj0dgg7gh659qdwnz40000gn/T/drone-NdlZgsprmhlic1eJ/drone/src/node_modules/watchpack-chokidar2/node_modules/fsevents
24 > node install.js
25
26
27
28 > fsevents@1.2.13 install /private/var/folders/b8/z_h6cxwj0dgg7gh659qdwnz40000gn/T/drone-NdlZgsprmhlic1eJ/drone/src/node_modules/webpack-dev-server/node_modules/fsevents
29 > node install.js
30
31
32
33 > core-js@2.6.12 postinstall /private/var/folders/b8/z_h6cxwj0dgg7gh659qdwnz40000gn/T/drone-NdlZgsprmhlic1eJ/drone/src/node_modules/babel-runtime/node_modules/core-js
34 > node -e "try{require('./postinstall')}catch(e){}"
35
36
37 npm WARN @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.13.12 requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.
38 npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 >= 3.2.0-dev >= 3.3.0-dev >= 3.4.0-dev >= 3.5.0-dev >= 3.6.0-dev >= 3.6.0-beta >= 3.7.0-dev >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
39 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
40 npm WARN optional
41 SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 install: `node install.js`
42 npm
43 WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn sh ENOENT
44 npm WARN
45 optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
46 npm
47
48 WARN
49
50 optional
51 SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 install: `node install.js`
52 npm
53 WARN
54 optional
55 SKIPPING OPTIONAL DEPENDENCY: spawn sh ENOENT
56
57 npm ERR!
58 code
59 ELIFECYCLE
60 npm ERR!
61 syscall
62 spawn sh
63 npm
64 ERR!
65
66 file
67 sh
68 npm
69
70 ERR!
71 path
72 sh
73 npm
74
75 ERR!
76 errno
77 -2
78 npm ERR!
79 core-js@2.6.12 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
80 npm ERR!
81 spawn sh ENOENT
82 npm
83 ERR!
84
85 npm
86 ERR!
87 Failed at the core-js@2.6.12 postinstall script.
88 npm
89 ERR!
90 This is probably not a problem with npm. There is likely additional logging output above.
91
92 npm
93 ERR!
94 A complete log of this run can be found in:
95 npm
96
97 ERR!
98 /var/folders/b8/z_h6cxwj0dgg7gh659qdwnz40000gn/T/drone-NdlZgsprmhlic1eJ/home/drone/.npm/_logs/2021-06-04T15_38_17_141Z-debug.log
I’m not able to figure out the issue. Any help with resolving this is deeply appreciated.
Thanks