(初学者问题)尝试安装parcel.js时遇到错误

时间:2020-06-09 20:57:18

标签: node.js npm npm-install parcel parceljs

我是编程新手,尝试安装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

1 个答案:

答案 0 :(得分:0)

凯文,

我认为您遇到了与NPM中的管理提升相关的问题。

尝试在命令中为sudo前缀NPM。

例如:

sudo npm install parcel