create-react-native-app: Cannot find module './build/Release/DTraceProviderBindings'
Description
Hi, Iโm getting the following issue (screenshot attached too) after updating the CRNA app. I changed the version from the package.json and sdk version from app.json file. Whenever I run yarn start, it displays some error but the app works fine though.
Observed Behavior
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/xxxx/xx/xx/xx/xx/xx/xx/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3) code: 'MODULE_NOT_FOUND' }
Environment
npm ls react-native-scripts: react-native-scripts@0.0.25npm ls react-native: react-native@0.42.3npm ls expo: expo@15.1.2node -v: v7.4.0npm -v: 4.0.5yarn --version: 0.21.3watchman version: 4.7.0
Also specify:
- Operating system: MacOS 10.12.4
- Phone/emulator/simulator & version: NA
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 24
- Comments: 31 (7 by maintainers)
Just to add my 2ยข, indeed, removing
node_modulesand usingnpm iinstead ofyarnsolved it.in our next release we will remove all dependencies on dtrace-provider, which should make all of these issues go away. sorry about this!
@wass3r do you have xcode installed? and if so, have you accepted the license agreement?
This is fixed now. We no longer depend on dtrace! ๐
I encountered this and was able to fix it by using a Python version <
3.0.0, nukingnode_modulesand runningyarn.To see what the issue is for your system (or if the above did not solve the problem), run
V=1 node node_modules/dtrace-provider/scripts/install.js. If it fails, it should tell you what needs to be fixed (wrong Python version or needs XCode license agreement).The reason for the failure is that the
dtrace-providerdirectory does not contain abuild/Release/DTraceProviderBindings.nodefile. It doesnโt contain this file because thescripts/install.jsscript failed to run.Check your python version.
dtrace-providerfails to install with any python version >= 3.0.0.After
node_modulesfoldernpm iI was able to run
npm startsuccessfully.I had this error on an old
create-react-native-appproject and fixed it by runningyarn upgrade.However, I saw the following reference to
@exponentinstead of@expo. I nuked mynode_modulesand ranyarn, fixing that.I had the same issue, so I followed @babenzele 's suggestion, removed the
node_modulesfolder, and ranyarn install, the error was gone! Thanks @babenzele!I followed the instructions in the Stack Overflow referenced above and it did not solve the issue for me.
I figured out this issue: https://stackoverflow.com/questions/37550100/cannot-find-module-dtrace-provider
@dikaiosune : Hereโs the output:
xdl@37.0.1