(初级问题)在安装parcel.js时遇到了错误

问题描述 投票:0回答:1

我是编程新手,在尝试安装parcel.js时遇到了一些困难。

以下是我遇到的错误。

npm WARN deprecated [email protected]: 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 [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated

npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated

npm WARN deprecated [email protected]: 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
node.js npm npm-install parcel parceljs
1个回答
0
投票

Cavin,

我相信你遇到的问题与NPM的管理提升有关。

尝试在你的命令中用sudo作为NPM的前缀。

例如

sudo npm install parcel 
© www.soinside.com 2019 - 2024. All rights reserved.