我当时使用纱线,但更改为npm,然后决定继续使用纱线并重新安装它。但是,当我执行yarn install时,它开始给我这样的错误消息。它真的很长,所以我粘贴了部分消息。 yarn工作正常,它不会失败安装软件包。但是每次看到这么长的消息都非常烦人,我想知道如何防止这种情况。
gyp info using node@12.1.0 | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.1.0 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/Users/suhyunbaik/Works/dyomo-service/dyomo/frontend/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/suhyunbaik/Works/dyomo-service/dyomo/frontend/node_modules/react-scripts/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/suhyunbaik/Works/dyomo-service/dyomo/frontend/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/suhyunbaik/.node-gyp/12.1.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/suhyunbaik/.node-gyp/12.1.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/suhyunbaik/Works/dyomo-service/dyomo/frontend/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/suhyunbaik/.node-gyp/12.1.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/suhyunbaik/Works/dyomo-service/dyomo/frontend/node_modules/react-scripts/node_modules/fsevents',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.1.0 | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
../fsevents.cc:50:32: error: no template named 'Handle' in namespace 'v8'
static void Initialize(v8::Handle<v8::Object> exports);
~~~~^
../fsevents.cc:63:6: warning: field 'async_resource' will be initialized after field 'lockStarted' [-Wreorder]
: async_resource(\"fsevents:FSEvents\"), lockStarted(false) {
^
In file included from ../fsevents.cc:82:
../src/constants.cc:89:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagNone\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagNone));
^
/Users/suhyunbaik/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/suhyunbaik/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:90:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMustScanSubDirs\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMustScanSubDirs));
^
/Users/suhyunbaik/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
/Users/suhyunbaik/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
declarator __attribute__((deprecated(message)))
^
In file included from ../fsevents.cc:82:
../src/constants.cc:91:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUserDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUserDropped));
^
/Users/suhyunbaik/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATE_SOON(\"Use maybe version\",
^
gyp ERR! node-gyp -v v3.8.0
✨ Done in 32.10s.
我添加了package.json。
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"@babel/core": "7.2.2",
"@svgr/webpack": "4.1.0",
"autobind-decorator": "^2.4.0",
"axios": "^0.18.0",
"babel": "^6.23.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-jest": "23.6.0",
"babel-loader": "8.0.5",
"babel-plugin-named-asset-import": "^0.3.1",
"babel-preset-react-app": "^7.0.2",
"bfj": "6.1.1",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"css-loader": "1.0.0",
"dotenv": "6.0.0",
"dotenv-expand": "4.2.0",
"eslint": "5.12.0",
"eslint-config-react-app": "^3.0.8",
"eslint-loader": "2.1.1",
"eslint-plugin-flowtype": "2.50.1",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-react": "7.12.4",
"file-loader": "2.0.0",
"fs-extra": "7.0.1",
"html-webpack-plugin": "4.0.0-alpha.2",
"identity-obj-proxy": "3.0.0",
"jest": "23.6.0",
"jest-pnp-resolver": "1.0.2",
"jest-resolve": "23.6.0",
"jest-watch-typeahead": "^0.2.1",
"mini-css-extract-plugin": "0.5.0",
"mobx": "^5.9.4",
"mobx-react": "^5.4.3",
"mobx-react-router": "^4.0.7",
"node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pnp-webpack-plugin": "1.2.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-preset-env": "6.5.0",
"postcss-safe-parser": "4.0.1",
"query-string": "^6.4.2",
"react": "^16.8.6",
"react-app-polyfill": "^0.2.2",
"react-dev-utils": "^8.0.0",
"react-dom": "^16.8.6",
"react-markdown": "^4.0.8",
"react-router-dom": "^5.0.0",
"resolve": "1.10.0",
"sass-loader": "7.1.0",
"semantic": "^0.0.1",
"semantic-ui-react": "^0.86.0",
"style-loader": "0.23.1",
"terser-webpack-plugin": "1.2.2",
"ui": "^0.2.4",
"url-loader": "1.1.2",
"webpack": "4.28.3",
"webpack-dev-server": "3.1.14",
"webpack-manifest-plugin": "2.0.4",
"workbox-webpack-plugin": "3.6.3"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"webpack-bundle-tracker": "^0.4.2-beta"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.d.ts"
],
"resolver": "jest-pnp-resolver",
"setupFiles": [
"react-app-polyfill/jsdom"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,ts,tsx}"
],
"testEnvironment": "jsdom",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
"^.+\\.module\\.(css|sass|scss)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web",
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
},
"moduleFileExtensions": [
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
"node"
],
"watchPlugins": [
"/Users/suhyunbaik/Works/dyomo-service/dyomo/frontend/node_modules/jest-watch-typeahead/filename.js",
"/Users/suhyunbaik/Works/dyomo-service/dyomo/frontend/node_modules/jest-watch-typeahead/testname.js"
]
},
"babel": {
"plugins": [
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
],
"presets": [
"react-app"
]
}
}```
I installed the latest version of node.js, but this project does not use node.js. The backend is Django.