You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Dev] Module not found: Error: You attempted to import .../neuron/node_modules/react-refresh/runtime.js which falls outside of the project src/ directory
#3108
Closed
twhy opened this issue
Apr 8, 2024
· 0 comments
· Fixed by #3110
Running Neuron Wallet in dev mode with yarn start results in Module not found Error
Environment
OS: Mac OS 14.4.1
Yarn: 1.22.21
Node: v20.11.1
Reproduce Steps
Git clone repo
Follow README.md to install all dependencies
Run yarn start
Terminal logs
yarn start
yarn run v1.22.21
$ concurrently "cross-env BROWSER=none yarn run start:ui""wait-on -t 10000 http://127.0.0.1:3000 && yarn run start:wallet"
$ cd packages/neuron-ui && yarn run start
$ cross-env DISABLE_ESLINT_PLUGIN=true GENERATE_SOURCEMAP=false react-app-rewired start
[0] Browserslist: caniuse-lite is outdated. Please run:
[0] npx update-browserslist-db@latest
[0] Why you should do it regularly: https://github.com/browserslist/update-db#readme
[0] (node:99432) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
[0] (Use `node --trace-deprecation ...` to show where the warning was created)
[0] (node:99432) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
[0] Starting the development server...
[0]
[0] [BABEL] Note: The code generator has deoptimised the styling of /Users/twhy/Code/nervos/neuron/packages/neuron-ui/src/widgets/Icons/VerificationFailure.svg as it exceeds the max of 500KB.
[0] [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB.
[0] Failed to compile.
[0]
[0] Module not found: Error: You attempted to import /Users/twhy/Code/nervos/neuron/node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
[0] You can either move it inside src/, or add a symlink to it from project's node_modules/.[0] ERROR in ./src/components/AddressBook/index.tsx 1:40-119[0] Module not found: Error: You attempted to import /Users/twhy/Code/nervos/neuron/node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.[0] You can either move it inside src/, or add a symlink to it from project's node_modules/.
...
[0] ERROR in ./src/widgets/Tooltip/index.tsx 1:40-119
[0] Module not found: Error: You attempted to import /Users/twhy/Code/nervos/neuron/node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
[0] You can either move it inside src/, or add a symlink to it from project's node_modules/.[0] [0] webpack compiled with 243 errors
Screenshot
Diagnosis
react-refresh in root node_modules has version 0.14.0.
twhy
changed the title
[Dev] Module not found: Error: You attempted to import .../neuron/node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
[Dev] Module not found: Error: You attempted to import .../neuron/node_modules/react-refresh/runtime.js which falls outside of the project src/ directory
Apr 8, 2024
Description
Running Neuron Wallet in dev mode with
yarn start
results inModule not found Error
Environment
Reproduce Steps
yarn start
Terminal logs
Screenshot
Diagnosis
react-refresh
in rootnode_modules
has version0.14.0
.npm list react-refresh
resultPossible Fix
"react-refresh": "0.11.0"
todevDependencies
inneuron/packages/neuron-ui/package.json
.yarn
to install dependencies.yarn start
and it works!Notice: In this case,
react-refresh
in rootnode_modules
has version0.11.0
instead of0.14.0
.Update: Adding
[email protected]
toresolutions
in rootpackage.json
is better.The text was updated successfully, but these errors were encountered: