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.

`--npm` on new template project missing performance.now in runtime

See original GitHub issue

Version

0.66.0-rc.2

Build Target(s)

Android, iOS

Developer Environment

Intel, macOS

Issue and Reproduction Steps

Steps to repro

In terminal

$ npx react-native init YARN662 --version 0.66.0-rc2
$ npx react-native init NPM662 --npm --version 0.66.0-rc2

# This works
$ cd YARN662 && npx react-native run-android # or run-ios

# This doesn't work
$ cd NPM662 && npx react-native run-android # or run-ios

Here is how the --npm flag is used in react-native-cli: https://github.com/react-native-community/cli/blob/641b21f583c97e3d48ce87d5fe804f42db92fa5c/packages/cli/src/commands/init/init.ts#L213

Attempting diffs of node_modules

diff RN662/node_modules NPM662/node_modules diff -r RN66RC2/node_modules/react-native NPM662/node_modules/react-native

Outstanding questions – to be investigated

  1. Is this issue unique to 0.66.0? 0.66.0-rc.2?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Titozzzcommented, Sep 22, 2021

@lunaleaps @ShikaSD fixed in CLI 6.0.1

0reactions
fkgozalicommented, Sep 22, 2021

We still need to verify if performance.now is now working with the CLI 6.0.1, I’ll report back later.

OK, I verified it worked properly with the CLI update

npx react-native init NPM66_3b --npm --version 0.66.0-rc.3

Verified peer deps:

npm ls react-native
npm66_3b@0.0.1 /Users/fkg/tmp/NPM66_3b
└─┬ react-native@0.66.0-rc.3
  └─┬ @react-native-community/cli@6.0.1
    └── react-native@0.66.0-rc.3 deduped

And building w/ Xcode and running it worked with no issue:

Simulator Screen Shot - iPhone 12 Pro - 2021-09-22 at 09 53 09

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage npm packages - Visual Studio (Windows)
Visual Studio helps you to manage packages using the Node.js package manager (npm)
Read more >
performance-now - npm
Implements performance.now (based on process.hrtime).. Latest version: 2.1.0, last published: 6 years ago. Start using performance-now in ...
Read more >
Build Node.js Apps with Visual Studio Code
Node.js is the runtime and npm is the Package Manager for Node.js modules. ... You'll need to open a new terminal (command prompt)...
Read more >
How To Use Node.js Modules with npm and package.json
Using the init Command. First, set up a project so you can practice managing modules. In your shell, create a new folder called...
Read more >
Bun: Fast JavaScript runtime, transpiler, and NPM client ...
js app about 20x faster than any other npm client available today. hyperfine "bun install --backend=hardlink" "yarn install --no-scripts" "npm ...
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