我正在尝试在Ubuntu 19.04
上安装ReactJs项目。由于某些原因,在一个名为inotify
的特定软件包中安装似乎总是失败。
我目前在node v12.10.0
和npm v6.10.3
上
我尝试了几件事,甚至尝试单独安装inotify,但似乎没有任何效果。我仍然不知道这个问题的原因。
这是我的package.json文件。
{
"name": "im-lite",
"version": "0.1.0",
"private": true,
"homepage": "http://localhost/React-Redux/im-lite/build",
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"css-loader": "^0.23.1",
"dev": "0.1.3",
"react-scripts": "^2.1.1",
"style-loader": "^0.13.1"
},
"dependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-react": "^6.23.0",
"babel-register": "^6.24.1",
"bcrypt": "^1.0.2",
"body-parser": "^1.17.1",
"compression": "^1.7.1",
"constants": "0.0.2",
"cookie-parser": "^1.4.3",
"cors": "^2.8.3",
"css-loader": "^0.23.1",
"debug": "^2.6.6",
"encoding": "^0.1.12",
"express": "^4.15.2",
"express-status-monitor": "^1.1.4",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.1",
"floating-label-react": "^0.2.0",
"formidable": "^1.1.1",
"fs": "0.0.1-security",
"geoip-lite": "^1.2.1",
"http": "0.0.0",
"import-export": "^1.0.1",
"inherits": "^2.0.3",
"ipaddr.js": "^1.3.0",
"isomorphic-fetch": "^2.2.1",
"json-loader": "^0.5.7",
"loader-utils": "^1.1.0",
"mime": "^2.3.1",
"next": "^6.1.1",
"node-env-file": "^0.1.8",
"node-fetch": "^1.6.3",
"path": "^0.12.7",
"preact": "^8.2.6",
"preact-compat": "^3.17.0",
"qs": "^6.4.0",
"query-string": "^6.1.0",
"react": "^15.5.4",
"react-addons-update": "^15.5.2",
"react-adsense": "0.0.5",
"react-alice-carousel": "^1.13.11",
"react-dom": "^15.5.4",
"react-helmet": "^5.2.0",
"react-hot-loader": "^1.3.1",
"react-html-parser": "^1.0.3",
"react-lazy-load": "^3.0.13",
"react-player": "^1.11.0",
"react-redux": "^5.0.4",
"react-responsive-carousel": "^3.1.49",
"react-router": "^3.0.5",
"react-share": "^2.4.0",
"react-toolbox": "^2.0.0-beta.7",
"react-virtualized": "^9.7.5",
"redux": "^3.6.0",
"redux-infinite-scroll": "^1.0.9",
"redux-thunk": "^2.2.0",
"register": "0.0.0",
"request": "^2.81.0",
"request-ip": "^2.0.2",
"serviceworker-webpack-plugin": "^0.2.1",
"style-loader": "^0.13.2",
"sw-precache-webpack-plugin": "^0.9.1",
"uglifyjs-webpack-plugin": "^0.4.6",
"url": "^0.11.0",
"url-loader": "^1.1.2",
"url-parse": "^1.4.1",
"uuid": "^3.0.1",
"webpack": "^4.27.1",
"webpack-dev-middleware": "^1.10.2",
"webpack-hot-middleware": "^2.18.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom"
}
}
这是我执行sudo npm-install
npm WARN deprecated fsevents@1.2.4: Way too old
inotify@1.4.6 install /home/vaibhav/Desktop/im/mobile-im-pw/im-lite/node_modules/inotify
node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/vaibhav/Desktop/im/mobile-im-pw/im-lite/node_modules/inotify/build'
gyp ERR! System Linux 5.0.0-29-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vaibhav/Desktop/im/mobile-im-pw/im-lite/node_modules/inotify
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm WARN @babel/helper-create-class-features-plugin@7.6.0 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-named-capturing-groups-regex@7.6.0 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN acorn-jsx@5.0.2 requires a peer of acorn@^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN babel-plugin-named-asset-import@0.3.4 requires a peer of @babel/core@^7.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN extract-text-webpack-plugin@2.1.2 requires a peer of webpack@^2.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN next@6.1.2 requires a peer of react@^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN next@6.1.2 requires a peer of react-dom@^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN serviceworker-webpack-plugin@0.2.3 requires a peer of webpack@1 || ^2 || ^3 but none is installed. You must install peer dependencies yourself.
npm WARN sw-precache-webpack-plugin@0.9.2 requires a peer of webpack@^1 || ^2 || ^2.1.0-beta || ^2.2.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp@1.1.4 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN uglifyjs-webpack-plugin@0.4.6 requires a peer of webpack@^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@1.12.2 requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package babel-core is included as both a dev and production dependency.
npm WARN The package babel-loader is included as both a dev and production dependency.
npm WARN The package css-loader is included as both a dev and production dependency.
npm WARN The package style-loader is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/react-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! inotify@1.4.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the inotify@1.4.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vaibhav/.npm/_logs/2019-09-23T12_00_42_775Z-debug.log
我在做什么错了?