React Native init MyProject throw error - react-native

I am now studying React Native. I can create the RN Project by executing command react-native init myProject successfully before. But today I do the same job , I got an error:
module.js:471
throw err;
^
Error: Cannot find module './src/init'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/Blain/Desktop/ReactNative/RNScrollView/node_modules/gulp-sourcemaps/index.js:4:9)
at Module._compile (module.js:570:32)
at Module._extensions..js (module.js:579:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/Blain/Desktop/ReactNative/RNScrollView/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
Please help me to solve this problem , TKS. By the way, My Mac os is macOS Sierra 10.12

You should look at this link. Maybe this is the issue you are experiencing.

Related

can't find module webpack.dev.js in cornerstone 2.0

Bigcommerce has released the new cornerstone theme version 2.0 and I use it for the store development but whenever I fire stencil start command, it gets the error and the error you can see below
module.js:538
throw err;
^
Error: Cannot find module './webpack.dev.js'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (E:\cornerstone\stencil.conf.js:2:17)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
This was an issue on our end, fixed in the 2.1 release. You can download Cornerstone 2.1 here:
https://github.com/bigcommerce/cornerstone/releases/tag/2.1.0
You'll also want to make sure you've updated Stencil CLI to version 1.15.0.

Error with chalk module installing Vue-cli

Configuring VUE-CLI I am having the next problem:
internal/modules/cjs/loader.js:596
throw err;
^
Error: Cannot find module 'chalk'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/usr/local/bin/vue:3:15)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
I have tried to install the module globally but with the same result, when I type in the terminal vueerror appears again.
Could you tell me please how to fix this problem?
It was fixed adding the correct PATHS in the .zshrc file, I was adding them to the bash_profile but I am working with other shell.
see the error "Error: Cannot find module 'chalk'"
try
npm install chalk

Error starting up React Native packager "Cannot find module metro-bundler"

I have a simple React Native project that works fine on the original machine I created it on, but when I clone the git repo on another machine and try to run the iOS project, I get this error when starting the packager:
module.js:471
throw err;
^
Error: Cannot find module 'metro-bundler/build/lib/formatBanner'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (.../node_modules/react-native/local-cli/server/checkNodeVersion.js:12:20)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Process terminated. Press <enter> to close the window
The project is on GitHub here. I purposely didn't git ignore the node_modules folder because this project has some slight modifications to React Native itself. It seems if I delete node_modules and yarn install it resolves the issue but I'd like to have the GitHub repo in a state where you can clone and you don't need to run anything to set up dependencies.

Cannot read property 'Promise' of undefined in ice demo

https://doc.zeroc.com/display/Ice36/Writing+an+Ice+Application+with+JavaScript
Just the official website example,when I run node Client.js,
Ice.Promise.try(
^
TypeError: Cannot read property 'Promise' of undefined
at Object.<anonymous> (/home/lanceloft/learn/ice/Client.js:6:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
system: ubuntu16.04
Looks like a bug in the documentation, require("icejs") should be replaced with require("ice"). Can you try to see if that fixes your problem?
We'll fix the documentation! Otherwise, you can take a look at the JavaScript demos here for some starting points> https://github.com/zeroc-ice/ice-demos/tree/3.6/js
Benoit.

module.js:339 throw err; Error: Cannot find module 'npmlog' on WINDOWS 8 Pro

[module.js:339 throw err;
Error: Cannot find module 'npmlog' on WINDOWS 8 Pro
I have tried to reinstall nodejs but still not working on windows.
module.js:339
throw err;
Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:18:11
at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:75:3)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
I just experienced this problem on OS X Yosemite 10.10.5.
This is caused by backwards incompatibilities with Node versions.
You can fix this by deleting all old (incompatible) Node modules:
*nix
rm -rf /usr/local/bin/node_modules
Windows
rmdir %appdata%\npm\node_modules /s /q