我一直在尝试在虚拟机(Ubuntu 20.04)上运行本地 SquareSpace 服务器,具体操作如下https://developers.squarespace.com/get-started
当我运行 npm install -g @squarespace/server 时返回以下错误
> @squarespace/[email protected] copyrunscript /usr/lib/node_modules/@squarespace/server
> node scripts/copyfile.js build/distributions/local-developer/bin/run.bat darwin:build/distributions/local-developer/bin/osx-local-developer win32:build/distributions/local-developer/bin/win-local-developer.bat linux:build/distributions/local-developer/bin/linux-local-developer build/distributions/local-developer/bin/local-developer
copying build/distributions/local-developer/bin/linux-local-developer to build/distributions/local-developer/bin/run.bat
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/@squarespace/server/build/distributions/local-developer/bin/run.bat
npm ERR! dest /usr/bin/squarespace-server
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/@squarespace/server/build/distributions/local-developer/bin/run.bat' -> '/usr/bin/squarespace-server'
npm ERR! [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/@squarespace/server/build/distributions/local-developer/bin/run.bat' -> '/usr/bin/squarespace-server'] {
npm ERR! cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/@squarespace/server/build/distributions/local-developer/bin/run.bat' -> '/usr/bin/squarespace-server'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/@squarespace/server/build/distributions/local-developer/bin/run.bat',
npm ERR! dest: '/usr/bin/squarespace-server'
npm ERR! },
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/@squarespace/server/build/distributions/local-developer/bin/run.bat',
npm ERR! dest: '/usr/bin/squarespace-server'
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.
有人能告诉我该怎么做才能解决这个问题吗?我之前已经尝试过使用 sudo 运行命令,但它返回了权限错误,而且我在网上搜索的所有答案都表明运行 sudo npm install 是应该避免的。