сегодня я получил странное явление, когда дело доходит до упаковки моего электронного приложения с электронным компоновщиком.Двоичный файл некоторых из моих узлов node_modules, имеющих символическую ссылку внутри своего каталога .bin, не может быть прочитан сборщиком электронов.это один из модулей с этой ошибкой:
yarn run v1.12.1
$ build --dir
• electron-builder version=20.28.4
• loaded configuration file=package.json ("build" field)
• loaded parent configuration preset=react-cra
• writing effective config file=dist\builder-effective-config.yaml
• no native production dependencies
• packaging platform=win32 arch=x64 electron=3.0.0 appOutDir=dist\win-unpacked
Cannot read file C:\Users\bahasakita-lenovo2\Desktop\Git\NotulaV30\node_modules\audio-type\.bin\audio-type: Error: ENOENT: no such file or directory, open 'C:\Users\bahasakita-lenovo2\Desktop\Git\NotulaV30\node_modules\audio-type\.bin\audio-type'
at w (C:\Users\bahasakita-lenovo2\Desktop\Git\NotulaV30\node_modules\app-builder-lib\src\asar\asarUtil.ts:201:11)
at writeStream.write (C:\Users\bahasakita-lenovo2\Desktop\Git\NotulaV30\node_modules\app-builder-lib\src\asar\asarUtil.ts:194:41)
at afterWrite (_stream_writable.js:480:3)
at onwrite (_stream_writable.js:471:7)
at lazyFs.write (internal/fs/streams.js:304:5)
at FSReqWrap.wrapper [as oncomplete] (fs.js:502:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Я попытался удалить символическую ссылку .bin и скопировать правильный двоичный файл в .bin в одном из моих узлов node_modules.Это решит тот один модуль, но есть очень много модулей, которые также имеют эту ошибку. Есть ли что-нибудь, что я могу сделать, чтобы смягчить эту ситуацию?
Это мой package.json:
{
"name": "test",
"version": "0.1.0",
"private": true,
"dependencies": {
"acorn": "^6.0.4",
"audiobuffer-to-wav": "git+https://github.com/cyclonstep/audiobuffer-to-wav.git",
"babel-preset-es2015": "^6.24.1",
"bootstrap": "^4.1.1",
"bootstrap-daterangepicker": "^3.0.3",
"concatenateblobs": "https://github.com/muaz-khan/ConcatenateBlobs.git",
"connected-react-router": "^4.3.0",
"crypto-js": "^3.1.9-1",
"electron-debug": "^2.0.0",
"electron-is-dev": "^0.3.0",
"electron-log": "^2.2.17",
"esdoc": "^1.1.0",
"esdoc-ecmascript-proposal-plugin": "^1.0.0",
"esdoc-jsx-plugin": "^1.0.0",
"esdoc-react-plugin": "^1.0.1",
"esdoc-standard-plugin": "^1.0.0",
"file-saver": "^1.3.8",
"history": "^4.7.2",
"html-to-rtf": "^1.3.0",
"idb": "^2.1.3",
"immutability-helper": "^2.7.1",
"is-electron": "^2.2.0",
"javascript": "^1.0.0",
"jquery": "^3.3.1",
"jspdf": "^1.4.1",
"jspdf-autotable": "^2.3.5",
"macaddress": "^0.2.9",
"md5": "^2.2.1",
"moment": "^2.22.2",
"moment-timezone": "^0.5.23",
"msr": "^1.3.4",
"node-summary": "git+https://github.com/cyclonstep/node-summary.git",
"node-wav": "^0.0.2",
"parse5": "^5.0.0",
"prop-types": "^15.6.2",
"rc-slider": "git+https://github.com/cyclonstep/slider.git",
"react": "^16.4.1",
"react-addons-shallow-compare": "^15.6.2",
"react-bootstrap-daterangepicker": "^4.1.0",
"react-chartjs": "^1.2.0",
"react-chartjs-2": "^2.7.2",
"react-chat-widget": "^2.1.4-1",
"react-dates": "^17.1.1",
"react-datetime": "^2.14.0",
"react-dom": "^16.4.1",
"react-draggable": "^3.0.5",
"react-dynamic-slider": "^0.4.0",
"react-google-login": "^3.2.1",
"react-highlight-words": "^0.14.0",
"react-history": "^0.18.2",
"react-hot-loader": "^4.3.3",
"react-joyride": "^2.0.0-15",
"react-js-pagination": "^3.0.2",
"react-loadable": "^5.5.0",
"react-loader-spinner": "^2.1.0",
"react-mic": "^11.0.0",
"react-new-window": "^0.0.9",
"react-notifications": "^1.4.3",
"react-popper": "^1.0.0",
"react-rangeslider": "^2.2.0",
"react-redux": "^5.0.7",
"react-responsive": "^5.0.0",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-router-redux": "^5.0.0-alpha.9",
"react-scripts": "^1.0.17",
"react-select": "^2.1.1",
"react-spinner": "^0.2.7",
"react-stopwatch": "^1.1.1",
"react-swipeable": "^4.3.0",
"react-transition-group": "^2.3.1",
"react-with-styles": "^3.2.0",
"react-with-styles-interface-aphrodite": "^5.0.0",
"reactstrap": "^6.3.0",
"recordrtc": "https://github.com/cyclonstep/RecordRTC.git",
"redux": "^4.0.0",
"redux-logger": "^3.0.6",
"redux-socket.io": "^1.4.0",
"redux-thunk": "^2.3.0",
"set-default-browser": "^1.0.1",
"source-map-explorer": "^1.6.0",
"styled-components": "^3.4.10",
"typed.js": "^2.0.8",
"wav": "^1.0.2",
"web-audio-engine": "^0.13.4",
"xml-writer": "^1.7.0",
"xmldom": "^0.1.27",
"xmlserializer": "^0.6.1",
"xpath": "0.0.27"
},
"build": {
"appId": "com.notulav30.apps"
},
"scripts": {
"start": "react-scripts start",
"analyze": "source-map-explorer build/static/js/main.*",
"test": "react-scripts test --env=jsdom",
"build": "react-scripts build",
"eject": "react-scripts eject",
"nf-start": "nf start -p 3000",
"electron": "electron .",
"electron-start": "nodemon src/electron-wait-react",
"pack": "build --dir",
"dist": "npm run build && build",
"postinstall": "install-app-deps"
},
"description": "This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).",
"main": "src/electron-starter.js",
"homepage": "./",
"devDependencies": {
"aphrodite": "^2.2.3",
"babel-plugin-dynamic-import-webpack": "^1.0.2",
"chart.js": "^2.7.2",
"concurrently": "^4.0.1",
"electron": "^3.0.0",
"electron-builder": "^20.28.4",
"electron-devtools-installer": "^2.2.4",
"electron-packager": "^12.2.0",
"jshint": "^2.9.5",
"sw-precache": "^5.2.1",
"wait-on": "^3.0.1"
},
"author": "myself",
"license": "ISC"
}
О, я использую Windows 10 и хотелупакуйте его для ОС Windows.спасибо:)