question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nodejs version: Unable to use `yarn dev` with nodejs v13.13.0

See original GitHub issue

nodejs v13.12.0 works fine, but with v13.13.0 I get the following error when running the command yarn dev:

[joe@hyrule decrediton]$ yarn dev
yarn run v1.22.4
$ npm run hot-server -- --start-hot
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1587622459185-0.3884170523506463/node but npm is using /usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> decrediton@1.6.0-pre hot-server /home/joe/git/decrediton
> cross-env NODE_ENV=development node --max_old_space_size=4096 -r @babel/register server.js "--start-hot"

internal/modules/cjs/loader.js:955
  throw err;
  ^

Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
Require stack:
- /home/joe/git/decrediton/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
- /home/joe/git/decrediton/node_modules/@babel/preset-env/lib/index.js
- /home/joe/git/decrediton/node_modules/@babel/core/lib/config/files/plugins.js
- /home/joe/git/decrediton/node_modules/@babel/core/lib/config/files/index.js
- /home/joe/git/decrediton/node_modules/@babel/core/lib/index.js
- /home/joe/git/decrediton/node_modules/@babel/register/lib/cache.js
- /home/joe/git/decrediton/node_modules/@babel/register/lib/node.js
- /home/joe/git/decrediton/node_modules/@babel/register/lib/index.js
- internal/preload
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
    at Function.Module._load (internal/modules/cjs/loader.js:835:27)
    at Module.require (internal/modules/cjs/loader.js:1012:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/joe/git/decrediton/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js:10:55)
    at Module._compile (internal/modules/cjs/loader.js:1123:30)
    at Module._compile (/home/joe/git/decrediton/node_modules/pirates/lib/index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Object.newLoader [as .js] (/home/joe/git/decrediton/node_modules/pirates/lib/index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:972:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/joe/git/decrediton/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js',
    '/home/joe/git/decrediton/node_modules/@babel/preset-env/lib/index.js',
    '/home/joe/git/decrediton/node_modules/@babel/core/lib/config/files/plugins.js',
    '/home/joe/git/decrediton/node_modules/@babel/core/lib/config/files/index.js',
    '/home/joe/git/decrediton/node_modules/@babel/core/lib/index.js',
    '/home/joe/git/decrediton/node_modules/@babel/register/lib/cache.js',
    '/home/joe/git/decrediton/node_modules/@babel/register/lib/node.js',
    '/home/joe/git/decrediton/node_modules/@babel/register/lib/index.js',
    'internal/preload'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! decrediton@1.6.0-pre hot-server: `cross-env NODE_ENV=development node --max_old_space_size=4096 -r @babel/register server.js "--start-hot"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the decrediton@1.6.0-pre hot-server 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/joe/.npm/_logs/2020-04-23T06_14_19_981Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Running npm update does solve this issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
amass01commented, Apr 23, 2020

I don’t mind keeping it open. Actually there was packages change lately here: https://github.com/decred/decrediton/pull/2460, do you have the changes of that commit as well ? If you are running latest and the issue is still there, then we should keep this issue open and close it after the next deps upgrade which should resolve it.

0reactions
JoeGruffinscommented, Apr 24, 2020

#2460 has solved this issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inconsistency between node versions of npm and yarn #812
The engine "node" is incompatible with this module. Expected version ">=4.5.0". If the current behavior is a bug, please provide the steps to ......
Read more >
Yarn not installing in nvm version node version - Stack Overflow
When you install a new node version using nvm and then used npm to install yarn, you need to reinstall the yarn for...
Read more >
How to Easily Update Node.js to the Latest Version
1. Updating using a Node version manager on macOS or Linux. A Node version manager is a utility that lets you install different...
Read more >
Download & Update Node.js to the Latest Version! Node v19 ...
Direct download links to update to the latest Node.js versions: Node v19.0.0 / LTS v16.18.0.
Read more >
Installing Node.js via package manager
It allows you to perform operations like install, uninstall, switch Node versions automatically based on the current directory, etc. To install fnm, use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found