解决方案:
nvm use v10.16.2
出现如下报错:
Traceback (most recent call last):
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
sys.exit(gyp.script_main())
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
return main(sys.argv[1:])
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
return gyp_main(args)
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 520, in gyp_main
[generator, flat_list, targets, data] = Load(
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 136, in Load
result = gyp.input.Load(build_files, default_variables, includes[:],
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2778, in Load
LoadTargetBuildFile(build_file, data, aux_data,
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 416, in LoadTargetBuildFile
ProcessVariablesAndConditionsInDict(
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1295, in ProcessVariablesAndConditionsInDict
ProcessVariablesAndConditionsInList(value, phase, variables,
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1311, in ProcessVariablesAndConditionsInList
ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1295, in ProcessVariablesAndConditionsInDict
ProcessVariablesAndConditionsInList(value, phase, variables,
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 1315, in ProcessVariablesAndConditionsInList
expanded = ExpandVariables(item, phase, variables, build_file)
File "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 914, in ExpandVariables
sys.stderr.write(p_stderr)
TypeError: write() argument must be str, not bytes while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.99-1-MANJARO
gyp ERR! command "/home/ice/.nvm/versions/node/v12.14.1/bin/node" "/home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ice/.nvm/versions/node/v12.14.1/lib/node_modules/remix-ide/node_modules/scrypt
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/remix-ide/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1