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 'left-pad' #16

Open
chenyun120 opened this issue Jan 14, 2019 · 2 comments
Open

Cannot find module 'left-pad' #16

chenyun120 opened this issue Jan 14, 2019 · 2 comments

Comments

@chenyun120
Copy link

native-xcode-node-folder[42936:134173] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
module.js:529
throw err;
^

Error: Cannot find module 'left-pad'
at Module._resolveFilename (module.js:529:5)
at Module._load (module.js:476:5)
at Module.prototype.require (module.js:568:3)
at require (internal/module.js:11:7)
at Anonymous function (/Users/CY/Library/Developer/CoreSimulator/Devices/986FC198-291E-496F-B81D-7E79E54F24DA/data/Containers/Bundle/Application/9950C232-5EE1-4454-A641-8C5AF820E751/native-xcode-node-folder.app/nodejs-project/main.js:2:1)
at Module.prototype._compile (module.js:624:5)
at Module._extensions[.js] (module.js:635:3)
at Module.prototype.load (module.js:545:3)
at tryModuleLoad (module.js:508:5)
at Module._load (module.js:500:3)

@jaimecbernardo
Copy link
Member

Hi @chenyun120 ,

Looks like left-pad is not available to the run time. Did you run npm install in the "How to Run" instructions?

Run npm install inside ios/native-xcode-node-folder/nodejs-project/.

It should create a node_modules/left-pad directory inside.

@bearc0025
Copy link

I get this same error. I can run the "simple" version of the project fine but when I try with the node module left-pad and require('left-pad'), I get this error.

I've done all of the steps including npm install. left-pad is inside the node_modules directory. The related files are in the Copy Bundle Resources in the Build Phases.

Any help is appreciated.
Screenshot 2023-09-07 at 2 15 13 PM

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

3 participants