Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module './build/Release/DTraceProviderBindings' #135

Closed
tusharkhatiwada opened this issue Mar 29, 2017 · 31 comments
Closed

Cannot find module './build/Release/DTraceProviderBindings' #135

tusharkhatiwada opened this issue Mar 29, 2017 · 31 comments

Comments

@tusharkhatiwada
Copy link

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.25
  • npm ls react-native: react-native@0.42.3
  • npm ls expo: expo@15.1.2
  • node -v: v7.4.0
  • npm -v: 4.0.5
  • yarn --version: 0.21.3
  • watchman version: 4.7.0

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

@anp
Copy link
Contributor

anp commented Mar 29, 2017

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

@tusharkhatiwada
Copy link
Author

@dikaiosune : Here's the output:
xdl@37.0.1

@anp
Copy link
Contributor

anp commented Apr 10, 2017

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. trentm/node-bunyan#216 (comment)

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

@wass3r
Copy link

wass3r commented Apr 19, 2017

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

  • npm ls react-native-scripts: react-native-scripts@0.0.27
  • npm ls react-native: react-native@0.42.3
  • npm ls expo: expo@15.1.3
  • node -v: v7.7.0
  • npm -v: 4.1.2
  • yarn --version: 0.23.2
  • watchman --version: 4.7.0
  • yarn list xdl: xdl@37.0.2
  1. Operating system: MacOS 10.12.4
  2. Phone/emulator/simulator & version: NA

@anp
Copy link
Contributor

anp commented Apr 19, 2017

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

@wass3r
Copy link

wass3r commented Apr 19, 2017

@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.

@anp anp changed the title Getting issue after updating. Cannot find module './build/Release/DTraceProviderBindings' Apr 21, 2017
@tim-phillips
Copy link

tim-phillips commented Apr 28, 2017

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/spawn-async@1.2.8: 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/spawn-async@1.2.8: 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 > node-uuid@1.4.8: Use uuid module instead
warning react-native > xcode > node-uuid@1.4.7: Use uuid module instead
warning react-native-scripts > xdl > auth0-js > xtend > object-keys@0.4.0:
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Rebuilding all packages...
success Saved lockfile.

@janhoogeveen
Copy link

janhoogeveen commented May 17, 2017

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

yarn list xdl results in:

yarn list v0.24.4
└─ xdl@40.0.0
✨  Done in 1.20s.

@samfeder
Copy link

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

@encorex
Copy link

encorex commented May 20, 2017

Same here, with:

yarn list v0.24.5
└─ xdl@37.0.2
✨ Done in 1.34s.

@edward-s
Copy link

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

@jzabala
Copy link

jzabala commented May 21, 2017

Same here with:

yarn list v0.24.5
└─ xdl@37.0.2
✨ Done in 1.37s.

@anp
Copy link
Contributor

anp commented May 22, 2017

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

trentm/node-bunyan#216
trentm/node-bunyan#60
trentm/node-bunyan#66

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

@jmlavoier
Copy link

Same issue here:

yarn list xdl is:

yarn list v0.24.5
✨ Done in 1.26s.

@jmlavoier
Copy link

I figured out this issue:
https://stackoverflow.com/questions/37550100/cannot-find-module-dtrace-provider

@ssteinerx
Copy link

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
└─ react-native@0.44.3
  • 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

@developerworks
Copy link

➜  create_rn_app git:(master) yarn list xdl
yarn list v0.24.6
└─ xdl@41.1.0
✨  Done in 0.79s.

Same error

@brentvatne
Copy link
Member

this comment seems useful: sysgears/apollo-universal-starter-kit#217 (comment)

@htxiong
Copy link

htxiong commented Jun 20, 2017

same issue at here

yarn list v0.24.6
└─ xdl@41.1.0
✨ Done in 0.74s.

@duanckham
Copy link

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

@jeantimex
Copy link

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!

@rc452860
Copy link

rc452860 commented Jun 26, 2017

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

@jaekschmitt
Copy link

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.

@xuv
Copy link

xuv commented Jun 27, 2017

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

@prochafilho
Copy link

@xuv that worked for me! Thank you.

@ashrewdmint
Copy link

ashrewdmint commented Jul 3, 2017

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.

@brentvatne
Copy link
Member

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

@bluepeter
Copy link

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

@jacksctsai
Copy link

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.

@brentvatne
Copy link
Member

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

@karlgroves
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests