Create-react-native-app: Cannot find module './build/Release/DTraceProviderBindings'

Created on 29 Mar 2017  Β·  31Comments  Β·  Source: expo/create-react-native-app

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

Also specify:

  1. Operating system: MacOS 10.12.4
  2. Phone/emulator/simulator & version: NA

screen shot 2017-03-29 at 11 07 50 am

Most helpful comment

Just to add my 2Β’, indeed, removing node_modules and using npm i instead of yarn solved it.

All 31 comments

Hi! Thanks for the report! Can you paste the output of yarn list xdl?

@dikaiosune : Here's the output:
[email protected]

I'm not sure why xdl is showing these issues, as the release process is supposed to clean up any dtrace stuff (although I didn't work on that, maybe @jesseruder remembers more details?). From a quick google it seems like an issue like a not-yet-accepted Xcode license agreement could cause problems?

c.f. https://github.com/trentm/node-bunyan/issues/216#issuecomment-288214835

If this crops up for more users, might be worth looking at a logger which doesn't attempt to use any native modules.

Same issue here. In my case the stated error shows up three times sequentially.

  1. Operating system: MacOS 10.12.4
  2. Phone/emulator/simulator & version: NA

@wass3r do you have xcode installed? and if so, have you accepted the license agreement?

@dikaiosune I have .. by using sudo xcodebuild -license accept, but to be sure I also used the interactive mode with sudo xcodebuild -license. Same result.

I had this error on an old create-react-native-app project and fixed it by running yarn upgrade.

However, I saw the following reference to @exponent instead of @expo. I nuked my node_modules and ran yarn, fixing that.

yarn upgrade v0.23.2
[1/4] πŸ”  Resolving packages...
warning react-native-scripts > xdl > @exponent/[email protected]: Please switch to @expo/spawn-async, the new name of this package. It's the same code with our new name.
warning react-native-scripts > xdl > @exponent/osascript > @exponent/[email protected]: Please switch to @expo/spawn-async, the new name of this package. It's the same code with our new name.
warning react-native-scripts > xdl > [email protected]: Use uuid module instead
warning react-native > xcode > [email protected]: Use uuid module instead
warning react-native-scripts > xdl > auth0-js > xtend > [email protected]:
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ“ƒ  Rebuilding all packages...
success Saved lockfile.

Same issue here. Xcode license is accepted on m machine.

yarn list xdl results in:

yarn list v0.24.4
└─ [email protected]
✨  Done in 1.20s.

Same here, exact same version and problem as @janhoogeveen.

Same here, with:

yarn list v0.24.5
└─ [email protected]
✨ Done in 1.34s.

I have the same issue
main reason why I stopped using CRNA altogether, and used expo XDE as a workaround for now

Same here with:

yarn list v0.24.5
└─ [email protected]
✨ Done in 1.37s.

I think we probably need to stop transitively depending on bunyan based on:

https://github.com/trentm/node-bunyan/issues/216
https://github.com/trentm/node-bunyan/issues/60
https://github.com/trentm/node-bunyan/issues/66

cc @jesseruder @brentvatne I think we need to replace bunyan in xdl for this to be fixed.

Same issue here:

yarn list xdl is:

yarn list v0.24.5
✨ Done in 1.26s.

I followed the instructions in the Stack Overflow referenced above and it did not solve the issue for me.

  • React Native version:
yarn ls v0.17.10
└─ [email protected]
  • Platform: IOS
  • Development Operating System: OS X, 10.11.6
  • Build tools: didn't explicitly use any, Xcode 8.2.1, 8C1002 is on system
➜  create_rn_app git:(master) yarn list xdl
yarn list v0.24.6
└─ [email protected]
✨  Done in 0.79s.

Same error

same issue at here

yarn list v0.24.6
└─ [email protected]
✨ Done in 0.74s.

I change the node version to v6.10.0, everything work.

I had the same issue, so I followed @babenzele 's suggestion, removed the node_modules folder, and ran yarn install, the error was gone! Thanks @babenzele!

image
image
I just follow office toturial init a project,and yarn start show this error
try @babenzele 's suggestion,no effect.

Check your python version. dtrace-provider fails to install with any python version >= 3.0.0.

After

  • switching my python version to 2.7.13
  • nuking my node_modules folder
  • running npm i

I was able to run npm start successfully.

Just to add my 2Β’, indeed, removing node_modules and using npm i instead of yarn solved it.

@xuv that worked for me! Thank you.

I encountered this and was able to fix it by using a Python version < 3.0.0, nuking node_modules and running yarn.

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-provider directory does not contain a build/Release/DTraceProviderBindings.node file. It doesn't contain this file because the scripts/install.js script failed to run.

in our next release we will remove all dependencies on dtrace-provider, which should make all of these issues go away. sorry about this!

Looking forward to this! Been driving me crazy. :) Any planned date for the release @brentvatne ?

I had the same error. It got fixed after I switched to python2 (I'm using anaconda) and then nuking node_module and re-run npm install.

This is fixed now. We no longer depend on dtrace! :)

I know this is an old issue but I wanted to comment on it in case anyone else has the same issue I had.

My issue was caused by having parentheses in my path.
/users/karlgroves/Dropbox (Personal)/foo/bar/bat/project...

Moving the project to a path without the parens worked for me.
You'll need to wipe out node_modules and reinstall again.

Was this page helpful?
0 / 5 - 0 ratings