Closed
Description
When I create an app from create-react-native-app
, and then running rm -rf node_modules; pnpm install
, the following messaged appears:
2018-03-01 15:42:20.929 [fatal][tid:main] Cannot find entry file node_modules/react-native-scripts/build/bin/crna-entry.js in any of the roots1: [
"/dev/xxx",
"/dev/xxx/node_modules/.registry.npmjs.org/expo/25.0.0/node_modules/expo",
"/dev/xxx/node_modules/.registry.npmjs.org/jest-expo/25.0.0/node_modules/jest-expo","/dev/xxx/node_modules/.registry.npmjs.org/json-schema-traverse/0.3.1/node_modules/json-schema-traverse",
"/dev/xxx/node_modules/.registry.npmjs.org/react/16.2.0/node_modules/react",
"/dev/xxx/node_modules/.registry.npmjs.org/react-native/0.52.0/node_modules/react-native",
"/dev/xxx/node_modules/.registry.npmjs.org/react-native-scripts/1.11.1/node_modules/react-native-scripts",
"/dev/xxx/node_modules/.registry.npmjs.org/react-test-renderer/16.2.0/node_modules/
But it is in the /dev/xxx
, but in pnpm all node_modules are symlinks.
In HasteFS
in jest-haste-map
:
exists(file) {
console.log('exists?', file, this._files[file])
return !!this._files[file];
}
...prints:
exists? /dev/xxx/node_modules/react-native-scripts/build/bin/crna-entry.js undefined
So it seems HasteFS is not handling symlinks correctly.
Environment
react-native info
Scanning folders for symlinks in /xxx/node_modules/.registry.npmjs.org/react-native/0.52.0/node_modules (7ms)
Environment:
OS: macOS Sierra 10.12.6
Node: 8.9.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.0 => 0.52.0