我正在尝试在离子项目中运行sudo npm install。运行后出现以下错误。我已经安装了NVM。我已经阅读并看到有权限,我似乎错了,但是我不确定安装库和插件需要做什么。我尝试使用sudo和不使用sudo来运行它,并得到相同的错误。
Jamess-MacBook-Pro:~ jamesseeliger$ cd project
Jamess-MacBook-Pro:project jamesseeliger$ sudo npm install
Password:
npm WARN deprecated win-spawn@2.0.0: use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) or [cross-spawn-async](https://github.com/IndigoUnited/node-cross-spawn-async) instead.
npm WARN deprecated coffee-script@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated istanbul@0.3.22: This module is no longer maintained, try this instead:
npm WARN deprecated npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated @ionic/cloud@0.8.2: Support for Ionic Cloud ended on January 31st, 2018. See https://ionicframework.com/pro
npm WARN deprecated npmconf@2.1.3: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated coffee-script@1.8.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated browserslist@0.4.0: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated connect@2.7.2: connect 2.x series is deprecated
npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.
npm WARN deprecated node-uuid@1.3.3: Use uuid module instead
npm WARN deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated hoek@0.9.1: The major version is no longer supported. Please update to 4.x or newer
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated minimatch@0.4.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
> typechecker@2.0.8 preinstall /Users/jamesseeliger/project/node_modules/typechecker
> node ./cyclic.js
> node-sass@3.8.0 install /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass
> node scripts/install.js
Cannot download "https://github.com/sass/node-sass/releases/download/v3.8.0/darwin-x64-67_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> fsevents@1.2.7 install /Users/jamesseeliger/project/node_modules/fsevents
> node install
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.7 and node@11.12.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/jamesseeliger/project/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/jamesseeliger/project/node_modules/fsevents/build'
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/jamesseeliger/project/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/jamesseeliger/project/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /Users/jamesseeliger/project/node_modules/fsevents
gyp ERR! node -v v11.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/jamesseeliger/project/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/jamesseeliger/project/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/jamesseeliger/project/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:197:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:988:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/jamesseeliger/project/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/jamesseeliger/project/node_modules/fsevents
node-pre-gyp ERR! node -v v11.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/jamesseeliger/project/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/jamesseeliger/project/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
> ws@0.4.32 install /Users/jamesseeliger/project/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> phantomjs@1.9.20 install /Users/jamesseeliger/project/node_modules/phantomjs
> node install.js
PhantomJS not found on PATH
/Users/jamesseeliger/project/node_modules/phantomjs/phantomjs is not writable: EACCES: permission denied, mkdir '/Users/jamesseeliger/project/node_modules/phantomjs/phantomjs'
Download already available at /tmp/phantomjs/phantomjs-1.9.8-macosx.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing /Users/jamesseeliger/project/node_modules/phantomjs/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-macosx.zip-extract-1553375548992/phantomjs-1.9.8-macosx -> /Users/jamesseeliger/project/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /Users/jamesseeliger/project/node_modules/phantomjs/lib/phantom/bin/phantomjs
> spawn-sync@1.0.15 postinstall /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall
> node-sass@3.8.0 postinstall /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass
> node scripts/build.js
Building: /usr/local/bin/node /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli '/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp@3.3.1
gyp info using node@11.12.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/which.js:14:12)
gyp verb `which` failed at F (/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/which.js:69:19)
gyp verb `which` failed at E (/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/which.js:81:29)
gyp verb `which` failed at /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/which.js:90:16
gyp verb `which` failed at /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/node_modules/isexe/index.js:44:5
gyp verb `which` failed at /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/node_modules/isexe/access.js:8:5
gyp verb `which` failed at FSReqCallback.args [as oncomplete] (fs.js:145:20)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/which.js:14:12)
gyp verb `which` failed at F (/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/which.js:69:19)
gyp verb `which` failed at E (/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/which.js:81:29)
gyp verb `which` failed at /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/which.js:90:16
gyp verb `which` failed at /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/node_modules/isexe/index.js:44:5
gyp verb `which` failed at /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/node_modules/which/node_modules/isexe/access.js:8:5
gyp verb `which` failed at FSReqCallback.args [as oncomplete] (fs.js:145:20) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `/usr/bin/python -c "import platform; print(platform.python_version());"` returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 11.12.0
gyp verb command install [ '11.12.0' ]
gyp verb install input version string "11.12.0"
gyp verb install installing version: 11.12.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 11.12.0
gyp verb build dir attempting to create "build" dir: /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/jamesseeliger/.node-gyp/11.12.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/jamesseeliger/.node-gyp/11.12.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Traceback (most recent call last):
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
return gyp_main(args)
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput
part_of_all=qualified_target in needed_targets)
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write
self.Pchify))
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources
cflags = self.xcode_settings.GetCflags(configname)
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags
archs = self.GetActiveArchs(self.configname)
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs
xcode_archs_default = GetXcodeArchsDefault()
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
xcode_version, _ = XcodeVersion()
File "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion
version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/jamesseeliger/project/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass
gyp ERR! node -v v11.12.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
Build failed
npm WARN karma-chai@0.1.0 requires a peer of chai@* but none is installed. You must install peer dependencies yourself.
npm WARN karma-mocha@0.1.10 requires a peer of mocha@* but none is installed. You must install peer dependencies yourself.
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.8.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.8.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jamesseeliger/.npm/_logs/2019-03-23T21_12_34_647Z-debug.log