如何使用npm安装软件包来解决此错误?

时间:2018-11-08 00:28:55

标签: node.js reactjs npm npm-install

npm ERR! Linux 4.15.0-36-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "create-react-app"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /tmp/npm-7054-19e3727d
npm ERR! code EROFS
npm ERR! errno -30
npm ERR! syscall mkdir

npm ERR! rofs EROFS: read-only file system, mkdir '/tmp/npm-7054-19e3727d'
npm ERR! rofs This is most likely not a problem with npm itself
npm ERR! rofs and is related to the file system being read-only.
npm ERR! rofs 
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don't support symlinks, give this error.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/path[...]/npm-debug.log

我刚刚开始学习react,在尝试安装create-react-app时收到以下错误消息。

我使用Ubuntu 18.04.1 LTS。

我在网上看了一下,但是到目前为止找到的解决方案并不是很有帮助。我已经尝试过的内容:

1. Reinstalling nodejs and npm 
2. Creating .npm-global and and adding the file to the path
3. Tried --no-bin-links

0 个答案:

没有答案