-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack scrypt.js: Critical dependency: the request of a dependency is an expression #3018
Comments
Thanks for opening this issue! We will fix and release it asap. |
@nivida This is getting obnoxious and upvotes are increasing in number. How can we help to resolve this? |
@Matelasse I'm working on a PR, at the request of @nivida, hopefully will have it up for review by tomorrow, I've just been pretty pressed for time this week. See: #2938 (comment). The webpack warning is just a warning, and it should be possible in your build pipeline or whatever to ignore it instead of failing (i.e. if you're experiencing a build failure — maybe check it's just a warning for you and not an actual failure). My apologies for any frustration this has caused. |
It’s currently a WIP, will be continuing today. |
Could someone please clarify how to actually fix the warning? |
Setting CI=false inside |
got the same problem here |
Is there a new status with the error? |
* until fix in web3.js is released for web3/web3.js#3018
I'm using rescripts to allow modifications on the CRA webpack config, so I removed the Here's my .webpack.config.js
.rescriptsrc.js
Hopefully this will help someone :) |
* Merge pull request #417 from magmo/funding-strategy player-b sends strategyApproved action when strategy is approved * Merge pull request #418 from magmo/simplify-channel-state Simplify channel state * Merge pull request #420 from magmo/new-process-actions Actions that spin up a new process * Merge pull request #421 from magmo/code-cleaning Code cleaning * Merge pull request #422 from magmo/simplify-channel Simplify channel * Initialize new processes for new process actions * Names imports consistently in redux/reducer * Factor out sharedData to a constant in initializeNewProtocol * Update packages/wallet/src/redux/reducer.ts Co-Authored-By: kerzhner <[email protected]> * Update packages/wallet/src/redux/reducer.ts Co-Authored-By: kerzhner <[email protected]> * Update packages/wallet/src/redux/reducer.ts Co-Authored-By: kerzhner <[email protected]> * Standardize protocol exports * Fix inialized.test mocks * Merge pull request #426 from magmo/direct-funding-channel-state Wire up direct funding protocol with channel store * Merge pull request #430 from magmo/ag-ledger-defunding Ledger De-Funding * Merge pull request #428 from magmo/application-protocol Application protocol * Merge pull request #436 from magmo/server Add server package * Merge pull request #423 from magmo/gk-concluding-protocol Finish off Concluding protocol * Merge pull request #439 from magmo/ag-get-funding-working-2 Changes to get Funding Process Working * Merge pull request #440 from magmo/ag-adj-state-updating Update shared data before protocol reducers * Merge pull request #427 from magmo/indirect-funding2 Reworking indirect funding * Merge pull request #446 from magmo/communication-module Create communication module * Merge pull request #449 from magmo/gk-cleanup-funding-storybook Clean-up storybook * Merge pull request #448 from magmo/gk-indirect-funding-views Views for indirect-funding * Merge pull request #455 from magmo/faster-tests Only test packages changed since master * Merge pull request #452 from magmo/gk-indirect-funding-screens Indirect-funding screens * Merge pull request #457 from magmo/circle-cache Cache dependencies for each package * Merge pull request #456 from magmo/communication-module Communication module * Merge pull request #458 from magmo/funding Funding protocol fixes * Merge pull request #459 from magmo/ag-hook-up-funding-protocol Add Indirect Funding Sub-protocol to funding protocol * Merge pull request #462 from magmo/process-id More unique process ids * Merge pull request #460 from magmo/clean-up-funding-actions Clean up funding actions * Add common-data package * Remove prebuilt contracts * Rename magmo-common-data to magmo-wallet-common * Merge pull request #453 from magmo/gk-split-concluding-protocol Closes #451 * Merge pull request #442 from magmo/gk-two-player-consensus-commitment-interface Indirect funding with the new Consensus App * Merge pull request #470 from magmo/gk-monitor-ledger-channel Use channelSubscriptions * Merge pull request #471 from magmo/ag-app-to-app-working Happy Path: App to App funding * Merge pull request #472 from magmo/ag-ledger-defunding-update Update Ledger De-funding to work with Consensus App * Merge pull request #466 from magmo/adjudicator-watcher-common-data Server adjudicator watcher * Address renames from magmo/apps#466 review * Use yarn workspaces * Prettier jest config files * transform using new location of babel-jest The transform is not a little more brittle, but assuming the location of the babel-jest module was already a bad idea * Use new web3-utils api * Invalidate circle cache * Merge pull request #482 from magmo/export-from-wallet Export code from wallet package * Update yarn.lock * Removing caches * Trying out yarn install * Set npmClient in package.json * magmo-wallet-client is a dependency in rps * add lerna run prepare to circle config See lerna/lerna#1021 * Revert "Removing caches" This reverts commit ac0c8ab049d879fc6632a437b6c564bdd07dbb60. * Pinning web3 version to 1.0.0-beta.37 * Change lerna bootstrap to yarn install * Changing heroku-postbuild for workspaces * Merge pull request #485 from magmo/prebuilt-contracts Remove ganache addresses from prebuilt contracts * Merge pull request #484 from magmo/ag-direct-funding-race-condition Fix Direct Funding Race Condition * Merge pull request #475 from magmo/gk-concluding Get concluding working * Merge pull request #488 from magmo/fix-open-game-card Fix OpenGameCard * Requiring NODE_ENV to be set outside of .env files and source code * Add .env.test * Debug log lines * Merge pull request #487 from magmo/conclude-instigated Move ConcludeInstigated to communication module * Merge pull request #494 from magmo/ag-fix-storybook Upgrade storybook to fix storybook error * Merge pull request #496 from magmo/build-last-in-circle Build after running tests * Fixing DEV_GANACHE_JSON_RPC_ENDPOINT * Use magmo-devtools env loading * Rename SERVER_NETWORK_ID to CHAIN_NETWORK_ID * Start adjudicator watcher * Rename yarn commands to 'functionality:action' style * Adjudicator watcher: call listen only when run as main * Update magmo-devtools * Use configureEnvVariables from magmo-devtools * Update yarn.lock * Merge pull request #497 from magmo/remove-package-lockfiles Remove package lockfiles * Fork adjudicator watcher * Remove adjudicator watcher from Procfile * Build before adjudicator watcher tests * Merge pull request #489 from magmo/ag-challenging Get Challenging/Responding Working * Add comment to fork in adjudicator-watcher.test.ts * Add noUnusedLocals TS flag * Add forceConsistentCasingInFileNames TS flag * Fix unused variable error * Add adjudicator watcher listen log line * Build server in prestart * Merge pull request #499 from magmo/server-protocols Update server to communicate via protocol actions. * Merge pull request #505 from magmo/gk-cleanup Enforce consistency across protocols * Merge pull request #510 from magmo/gk-dispute-responder-expirytime Dispute responder is shown expiryTime * Merge pull request #513 from magmo/ledger-channels Ledger channels * Merge pull request #514 from magmo/server-deposit-manager-rebased Server deposit manager * Add server run to launch.json * Adding readme clarification * Update packages/server/readme.md Co-Authored-By: andrewgordstewart <[email protected]> * Merge pull request #515 from magmo/ag-channel-init-fix Used one address per a wallet * Merge pull request #519 from magmo/ag-scoped-wallet-package Remove private field from wallet package.json * Making the adjudicator watcher test synchronous * Merge pull request #511 from magmo/gk-remove-terminated-processes Overhaul actions * Merge pull request #521 from magmo/ag-fix-compose-conclude Fix composeConcludeCommitment * Merge pull request #526 from magmo/gk-ttt-solidity-highlighting Enable solidity highlighting in ttt * Merge pull request #523 from magmo/gk-constant-destination Ensure destination field does not change in application channels * Merge pull request #524 from magmo/gk-reinstate-message-listener-tests Reinstate message listener tests * Merge pull request #527 from magmo/virtual-funding-spec Virtual funding spec * Merge pull request #528 from magmo/prepare-channel-protocol AdvanceChannel protocol * Merge pull request #531 from magmo/currentRound Store arbitrary number of commitments on channelState * Merge pull request #532 from magmo/advance-channel-reducer WIP: Initializing the advance-channel protocol * Merge pull request #533 from magmo/advance-channel-reducer WIP: Advance channel reducer * Merge pull request #525 from magmo/gk-cancelling-conclude Allow `Application-` to continue when instigator cancels conclude * Merge pull request #538 from magmo/advance-channel-reducer-post-fund Advance channel reducer when channel exists * Merge pull request #539 from magmo/advance-channel-reducer-safe-flaag Add clearedToSend flag to advanceChannelState * v0.2.0 * Merge pull request #542 from magmo/fix-version-issue Update magmo-wallet dependency to ^0.2.0 * Merge pull request #540 from magmo/refactor-direct-funding Refactor direct funding to use AdvanceChannel * Merge pull request #544 from magmo/handle-new-relayable-actions Handle new relayable actions * Merge pull request #509 from magmo/ag-reuse-ledger Re-Use Existing Ledger Channel * Merge pull request #530 from magmo/gk-unnest-defunding-from-dispute Un nest defunding from dispute * Merge pull request #546 from magmo/ag-existing-channel-fix Fix existing channel reducer * Merge pull request #548 from magmo/protocol-locator Add protocolLocator to `AdvanceChannel` state * Merge pull request #550 from magmo/ag-n-player-consensus Update Consensus Update protocol to support n players * Merge pull request #551 from magmo/gk-redux-thunk Use redux-saga to dispatch multiple actions * Merge pull request #553 from magmo/improve-commitment-test-helpers Improve commitment test helpers * Merge pull request #554 from magmo/virtual-funding-protocol WIP: Virtual funding protocol * Merge pull request #562 from magmo/ag-validate-transition Validate Transitions * Merge pull request #563 from magmo/ag-existing-from-indirect Rename ExistingChannelFunding to ExistingLedgerFunding and IndirectFunding to NewLedgerFunding * Merge pull request #552 from magmo/gk-denest-defunding-from-concluding De-nest defunding from concluding * Merge pull request #558 from magmo/gk-nest-dispute-under-application Nest Dispute under Application * Merge pull request #555 from magmo/gk-multiple-relayable-actions Relay multiple actions in an ordered batch * Merge pull request #560 from magmo/ag-ledger-top-up-redesign Ledger Top-Up Redesign * Merge pull request #568 from magmo/gk-remove-stale-notes Remove stale notes (redux diagrams) * Merge pull request #567 from magmo/upgrade-fmg-packages Upgrade fmg packages * Merge pull request #565 from magmo/ag-new-indirect-funding New Indirect Funding Protocol * Merge pull request #571 from magmo/gk-upgrade-fmg-core-in-rps Upgrade fmg-core in rps package * Merge pull request #572 from magmo/gk-cleanup2 Clean up * Merge pull request #573 from magmo/gk-existing-ledger-funding-ui Existing ledger funding UI * Add firebase address listener * Add message sender to firebase-relay * Remvove rps_games route * Send messages via firebase only for the /api/v2/channels route * Make firebase into a dynamically instantiated singleton * Remove stale comment * Use firebase for GAME_ENGINE messages * Merge pull request #577 from magmo/gk-storybook-overhaul Storybook overhaul * Merge pull request #578 from magmo/gk-use-shared-components Use shared components * Merge pull request #581 from magmo/virtual-funding Split virtual funding states * Add v1/channels route * Make firebase-relay names more descriptive * Add more descriptive variable names to firebase relay * Merge pull request #582 from magmo/advance-channel-commitment-type Add commitmentType to success state on advanceChannel * Merge pull request #591 from magmo/ag-remove-old-test-data Remove old test scenarios * Merge pull request #586 from magmo/virtual-funding Implement virtual funding to guarantor channel setup * Merge pull request #589 from magmo/virtual-funding-application-funding Implement virtual funding through application funding state * Add instruction for how to start firebase relay * Merge pull request #595 from magmo/ag-cu-cleared-to-send add Cleared To Send support to Consensus Update Protocol * Merge pull request #605 from magmo/ag-new-ledger-funding-refactor Exchange Post Fund Setups in Funding/NewLedgerFunding * Fix funding * Strip --inspect-brk from argv for adjudicator watcher * Move hub address and private key to environment variables * Do not use bespoke dotenv loading in rps package. * Changing one more DEV_GANACHE_PORT to GANACHE_PORT * Add back NODE_ENV to env.js in rps * Do not use configureEnvVariables in truffle.js * Add back dotenv and dotenv-expand to rps and wallet * Revert "Fix funding" This reverts commit 4b0f51681a6bd282f4d0c3c0bab268060e5efeed. * Merge pull request #608 from magmo/tslint-fix TSLint fails on build/start * Merge pull request #607 from magmo/ag-funding-fix Get Funding working * Merge pull request #610 from magmo/ag-funding-race-condition Fix Funding Race Condition * Merge pull request #613 from magmo/ag-indirect-target Indirect Funding now accepts target allocation/destination * Merge pull request #614 from magmo/server-constant-cleanup Move seed/test constants to own file * Merge pull request #615 from magmo/ag-keep-channel-open Remove SendKeepLedgerChannelApproved * Merge pull request #616 from magmo/upgrade-jest Upgrade jest * Merge pull request #604 from magmo/protocol-locator Protocol locator type guards * Merge pull request #617 from magmo/new-ledger-doesnt-fund NewLedgerFunding protocol doesn't fund * Merge pull request #620 from magmo/ag-funding-failure Update Protocol Locator in various Reducers * Merge pull request #621 from magmo/new-ledger-doesnt-fund-gk-tweaks Minor tweaks to documentation for #617 * Merge pull request #623 from magmo/existing-ledger-fix Correctly set funding state in New Ledger Channel protocol * Merge pull request #596 from magmo/server-commitment-round updateLedgerChannel now takes a round of commitments * Merge pull request #628 from magmo/ag-ledger-top-up-fix Fix Ledger Top Up * Merge pull request #632 from magmo/update-notes Slight update to protocol hierarchy * Merge pull request #626 from magmo/ag-concluding-fix Handle Commitment out of order in Concluding * Merge pull request #631 from magmo/consensus-update-when-not-our-turn More robust consensus-update protocol * Merge pull request #633 from magmo/funding-choice Offer choice of virtual or indirect funding when funding application channel * Merge pull request #634 from magmo/clean-up-initializers Clean up initializers * Merge pull request #630 from magmo/ag-redux-storage Implement redux storage * Merge pull request #640 from magmo/ag-funding-refactor Funding Refactor * Merge pull request #641 from magmo/ag-virtual-funding-ui Add basic UI for virtual Funding * Merge pull request #642 from magmo/valid-transition Valid transition * Merge pull request #646 from magmo/ag-fix-invalid-trans Fix Invalid Transition * Merge pull request #645 from magmo/ag-virtual-strategy-action-fix Fix Player B Container to choose VirtualFunding * Merge pull request #643 from magmo/ag-server-comm Separate out Messaging from Response logic * Merge pull request #647 from magmo/ag-firebase-send-fix Fix firebase sending * Merge pull request #652 from magmo/ag-storage-flag Add flag to control storage * Merge pull request #648 from magmo/ag-commitment-handling Get Virtual Funding Partially Working * Merge pull request #650 from magmo/ag-guarantee-channel-2 Get Virtual Funding Working * Merge pull request #655 from magmo/ag-virtual-defunding Virtual De-funding * Merge pull request #661 from magmo/ag-advance-channel-concluding Add Conclude support to AdvanceChannel * Merge pull request #659 from magmo/ag-indirect-funding-refactor Refactor Indirect-Defunding to use AdvanceChannel and ConsensusUpdate * Merge pull request #658 from magmo/ag-virtual-defundng-integration Add Virtual De-Funding to de-funding protocol. * Merge pull request #666 from magmo/ag-rename-indirect-funding Rename Indirect Funding to Ledger Funding * Merge pull request #665 from magmo/ag-add-concluding-tests Add Concluding Tests * Merge pull request #668 from magmo/ag-end-process Remove process when its done * Merge pull request #667 from magmo/ag-defunding-redesign Rework Concluding/Defunding * Merge pull request #673 from magmo/ag-handle-invalid-app-transition Handle invalid app transitions * Merge pull request #672 from magmo/ag-partial-funding-fix Fix Existing Ledger Channel Funding * Add simple priority queue * Revert "Add simple priority queue" This reverts commit 6da0bf51bea2b171eb823a90f57af47bd9e19896. * Merge pull request #676 from snario/liam/nvmrc Add .nvmrc * Merge pull request #675 from magmo/ag-update-master-protocol-doc Update protocols doc to reflect recent changes * Merge pull request #677 from magmo/ag-update-server-readme Remove outdated instructions from server readme * Deploy new contracts * Deploy ETHAssetHolder * Add signedState to commitment * Fix yarn install issue * Remove asAddress from converter * Fix server compile error * Fix length check * ForceMove now uses nitro-protocol * Add artifacts (with no deploy info) * Do not use test game artifact for now * Add createDepositTransaction * Merge pull request #687 from magmo/switch-to-nitro-createRespondWithMoveTransaction Update respond transaction to use nitro protocols * Merge pull request #688 from magmo/switch-to-nitro-concludeTransactionWithNitro Update createConcludeTransaction to nitro interface * Update createConclude and skip failing tests * Switch to local magmo wallet client * Add wallet from magmo/apps * Prettier write * Remove sha3 dependency * Get things compiling * Remove obsolete .circleci * SKIP_PREFLIGHT_CHECK=true * Fix contract references * Fix some old devtools refs * Remove babel-preset * Upgrade jest/ts-jest * Try running tests serially * add build:ci script * Monorepo adjustments to support adding magmo/wallet (#49) * Add types field to package.json of nitro-protocol * Add a few exports to @statechannels/nitro-protocol useful in wallet * Add mini-css-extract-plugin dependency to wallet * Add ERC20AssetHolder.json to pre-built-artifacts * Change imports of @statechannels/nitro-protocol to use distributed object, not files * Return AddressZero if pre-built-artifact has no network address * Run yarn * Apply prettier:write to index.ts * Use persisted workspaces in split CircleCI jobs (#51) * Add packages/<star>/node_modules to dependencies cache paths in CircleCI * Add packages/<star>/node_modules to workspace persisted paths * Update CircleCI to use test:ci command * Use require statement to lazy evaulate contract builds * Fix typo * Remove trailing-comma rule in tslint.json to get webpack build working * Add CI=false to get around web3/web3.js#3018
same problem again v1.2.1 |
same problem: |
same problem: It fix if modify node: false; with node: { buffer: true } in Versions |
WARNING in ./node_modules/web3-eth-accounts/src/scrypt.js 17:50-60 "dependencies": { |
so to get your angular app to work on web3 version 2 i wrote a angular script which executes on postinstall but that doesn't seem to exist in 1.0. The dependency warning itself is just a warning so you can still run the app without that being fixed. If you drop this in your project on the route and then execute it with node it should allow your angular app to work. Il do a PR when i get a chance to put that script in web3 1.0 as well. const fs = require('fs');
const f = './node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js';
// This is because we have to replace the `node:false` in the `/angular-cli-files/models/webpack-configs/browser.js`
// with `node: {crypto: true, stream: true}` to allow web3 to work with angular (as they enforce node: false.)
// as explained here - https://github.com/ethereum/web3.js/issues/2260#issuecomment-458519127
if (fs.existsSync(f)) {
fs.readFile(f, 'utf8', function(err, data) {
if (err) {
return console.log(err);
}
var result = data.replace(/node: false/g, 'node: {crypto: true, stream: true}');
fs.writeFile(f, result, 'utf8', function(err) {
if (err) return console.log(err);
});
});
} #2260 (comment) < link to where i answered this before. In terms of this dependency is anyone still looking at fixing it? been open for a while now happy to do a PR to fix it if not. |
This got fixed with the following commit and will be released asap. |
@nivida version 1.2.1 didn't solve this for me I still get error:
|
It will be released with 1.2.2 |
when 1.2.2 release |
This is still happening for me (v1.2.4) |
@SpiegelSoft Be sure you have updated the package-lock file of your project. |
Deleted package-lock and tried npm & yarn but i still get the same errors using CRA. |
@Liberalite Thanks for asking! As it looks like is it not resolving the package entry correctly. We have defined the |
@nivida Can you please share some code ? |
Same ^ It came back |
@gigd @x5engine Could you run For example, here's someone in a webpack issue about this topic 7 days ago noting that @truffle/contract depends on 1.2.1. |
I didn't know about That solves it for me |
How do you solve it @gjgd Don't we need to wait for the listed packages to upgrade to [email protected]+? |
Description
Building on v.1.2.1 using create-react-app fails due to webpack warning
/node_modules/web3-eth-accounts/src/scrypt.js Critical dependency: the request of a dependency is an expression"
when CI=true (ie, fail on warnings)Expected behavior
Building a create-react-app using webpack should succeed
Actual behavior
I am able to build everything locally, however the build fails in my CI environment. The warning is as follows:
I assume it is a result of this line:
https://github.com/ethereum/web3.js/blob/1.x/packages/web3-eth-accounts/src/scrypt.js#L17
Steps to reproduce the behavior
Error Logs
Gists
Versions
The text was updated successfully, but these errors were encountered: