node.js - (初学者问题)尝试安装 parcel.js 时遇到错误
问题描述
我是编程新手,在尝试安装 parcel.js 时遇到了一些困难
以下是我得到的错误:
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/parcel-bundler/bin/cli.js
npm ERR! dest /usr/local/bin/parcel
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/parcel-bundler/bin/cli.js' -> '/usr/local/bin/parcel'
npm ERR! [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/parcel-bundler/bin/cli.js' -> '/usr/local/bin/parcel'] {
npm ERR! cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/parcel-bundler/bin/cli.js' -> '/usr/local/bin/parcel'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/parcel-bundler/bin/cli.js',
npm ERR! dest: '/usr/local/bin/parcel'
npm ERR! },
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/parcel-bundler/bin/cli.js',
npm ERR! dest: '/usr/local/bin/parcel'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/cavingayle/.npm/_logs/2020-06-09T20_46_00_855Z-debug.log
解决方案
卡文,
我相信您遇到了与 NPM 中的管理提升相关的问题。
尝试在命令中为 NPM 加上 sudo 前缀。
例如:
sudo npm install parcel
推荐阅读
- elasticsearch - 弹性搜索嵌套聚合 - 文档中的方法不起作用
- javascript - 如何正确重新格式化 jQuery / JS 函数?
- amazon-ec2 - 如何解决/修复与正在运行的 Kubernetes pod 交互的问题(超时错误)?
- visual-studio-code - 如何将密码字段添加到 VS Code 设置页面?
- java - Kafka 将使用 Java 而非 Python 进行连接
- boolean-logic - 我们是否只为 minterms 输入 1,为 maxterms 输入 0?
- android - 如何在 ConstraintLayout 中的 ImageVew 上放置 TextView
- python - 当函数的一部分是向数组添加行并不断更新它时,如何对作用于 numpy 数组的函数使用并行处理?
- r - 将 `group_by %>% summarise` 添加到 list() 时出现警告:要替换的项目数不是替换长度的倍数
- python - python用户名和密码恢复系统读取文件问题