我是Laravel的新手,所以我想请一些帮助.我正在跟随Laracasts在
how to manage css and js的训练.
当我尝试运行npm install时,我会收到一些警告
npm WARN安装无法安装可选依赖项:不支持
我也试着用npm install -global gulp安装gulp,但是我明白了
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
所以基本上如果我尝试运行gulp命令,我会从命令行找到No命令’gulp’.
任何想法如何解决这一问题?
只是一些额外的信息:我在vm Ubuntu 14.04上,我的node.js和npm版本是:
node -v
v5.4.1
npm -v
3.3.12
这是我尝试运行npm install时遇到的错误–global gulp
最佳答案 这个npm WARN checkPermissions缺少对/usr/local/lib / node_modules的写访问权清楚地表明你正在运行的用户npm install –global gulp with没有对/usr/local/lib / node_modules的写访问权.请确保您具有正确的写入权限 – 如评论
https://docs.npmjs.com/getting-started/fixing-npm-permissions中所述