我已经在github中分叉了react-sortable-tree模块,进行了修改并将其安装到我的项目中。我现在需要构建该软件包,但是当我在package.json所在的软件包的根文件夹中执行npm run-script build
时,会收到以下错误日志。第11行似乎是出问题的地方,但我不知道错误在说什么。如何构建此模块?
这是git上的模块... https://github.com/lewishornsby/react-sortable-tree
1 verbose cli [
1 verbose cli '/usr/local/Cellar/node/14.4.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run-script',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v14.4.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle react-sortable-tree@2.8.0~prebuild: react-sortable-tree@2.8.0
6 verbose lifecycle react-sortable-tree@2.8.0~prebuild: unsafe-perm in lifecycle true
7 verbose lifecycle react-sortable-tree@2.8.0~prebuild: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/badmin/Documents/nodeHome/lewishornsby/react-amplify/node_modules/react-sortable-tree/node_modules/.bin:/Users/badmin/Documents/nodeHome/lewishornsby/react-amplify/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
8 verbose lifecycle react-sortable-tree@2.8.0~prebuild: CWD: /Users/badmin/Documents/nodeHome/lewishornsby/react-amplify/node_modules/react-sortable-tree
9 silly lifecycle react-sortable-tree@2.8.0~prebuild: Args: [ '-c', 'yarn run lint && yarn run clean' ]
10 info lifecycle react-sortable-tree@2.8.0~prebuild: Failed to exec prebuild script
11 verbose stack Error: react-sortable-tree@2.8.0 prebuild: `yarn run lint && yarn run clean`
11 verbose stack spawn ENOENT
11 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
11 verbose stack at ChildProcess.emit (events.js:315:20)
11 verbose stack at maybeClose (internal/child_process.js:1051:16)
11 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
12 verbose pkgid react-sortable-tree@2.8.0
13 verbose cwd /Users/badmin/Documents/nodeHome/lewishornsby/react-amplify/node_modules/react-sortable-tree
14 verbose Darwin 19.5.0
15 verbose argv "/usr/local/Cellar/node/14.4.0/bin/node" "/usr/local/bin/npm" "run-script" "build"
16 verbose node v14.4.0
17 verbose npm v6.14.6
18 error code ELIFECYCLE
19 error syscall spawn
20 error file sh
21 error errno ENOENT
22 error react-sortable-tree@2.8.0 prebuild: `yarn run lint && yarn run clean`
22 error spawn ENOENT
23 error Failed at the react-sortable-tree@2.8.0 prebuild script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]