There is an error when I build my react-native project with the version 0.20.0:
Looking for JS files in
/Users/rockyl/WorkSpaces/react-native/TinySNS
[13:55:06] <START> Building Dependency Graph
[13:55:06] <START> Crawling File System
[13:55:06] <START> Loading bundles layout
[13:55:06] <END> Loading bundles layout (1ms)
[Hot Module Replacement] Server listening on /hot
React packager ready.
ERROR unable to resolve root /Users/rockyl/WorkSpaces/react-native/TinySNS: failed to opendir(/Users/rockyl/WorkSpaces/react-native/TinySNS): No such file or directory
{"watchmanResponse":{"version":"4.4.0","error":"unable to resolve root /Users/rockyl/WorkSpaces/react-native/TinySNS: failed to opendir(/Users/rockyl/WorkSpaces/react-native/TinySNS): No such file or directory"}}
Error: unable to resolve root /Users/rockyl/WorkSpaces/react-native/TinySNS: failed to opendir(/Users/rockyl/WorkSpaces/react-native/TinySNS): No such file or directory
at BunserBuf.<anonymous> (/Users/rockyl/WorkSpaces/react-native/TinySNS/node_modules/react-native/node_modules/sane/node_modules/fb-watchman/index.js:95:23)
at emitOne (events.js:77:13)
at BunserBuf.emit (events.js:169:7)
at BunserBuf.process (/Users/rockyl/WorkSpaces/react-native/TinySNS/node_modules/react-native/node_modules/bser/index.js:289:10)
at /Users/rockyl/WorkSpaces/react-native/TinySNS/node_modules/react-native/node_modules/bser/index.js:244:12
at doNTCallback0 (node.js:419:9)
at process._tickCallback (node.js:348:13)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
here is the logs:
and here is the real-time logs:
But the root path truly exists.
Thanks for posting those logs; what's happening here is an issue with the casing of the WorkSpaces directory in that path that is being watched. There's some complicated background to this that results in watchman needing to know the exact casing of the file names so that we can report on case-change-only-renames.
The TL;DR is that you should either ask React Native to watch the path using Workspaces as the directory name, or rename the directory so that it is actually WorkSpaces (in other words, make sure that the path you're asking for exactly matches that of the filesystem).
There are a couple of watchman bugs here that I'll work on fixing in the meantime:
We should canonicalize this path using our strict canon at the earlier stage in watching (should make this use case "just work")
We should surface this error with this explanation when such a mismatch occurs
In short: Just rename the containing folder where your project is located to workspaces (All in lowercase), an example here:
Related
after changing a specific file's extension from .ts to .tsx I get:
Compiled with problems:X
ERROR in ./src/components/SomeComp/someFile.ts
Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, open '.../someFile.ts'
ERROR
No files matching 'C:\Users...\src\components\SomeComp\someFile.ts' were found.
it has happened recently and somehow figured out on its own,
then i switched branches and when returned it happened again
I tried what was suggested here, clearing the browser cache How to get Chrome to reload source maps?
also restarted the react dev server couple of times
but still it tries to find the file with the old .ts extension...
searched as much as I could but didn't find a solve...
edit:
after changing the extension back and forth and restarting the dev server it has figured out, but I would still love to know what was happening and what perhaps what should be done to handle this situation correctly in the future
I'm building a React Native app, where I'm running into the following issue: the package #react-native-picker/picker is being included by two different node modules. Because of this I run into the error:
tried to register two views with the same name RNCPicker.
I have tried using a "resolutions" block in the apps package.json with #react-native-picker/picker specified, but it doesn't help.
yarn why shows the following:
yarn why v1.22.5
[1/4] 🤔 Why do we have the module "#react-native-picker/picker"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "#react-native-picker/picker#1.12.0"
info Reasons this module exists
- "native-base" depends on it
- Hoisted from "native-base##react-native-picker#picker"
- Hoisted from "component-library#react-native-picker-select##react-native-picker#picker"
info Disk size without dependencies: "488KB"
info Disk size with unique dependencies: "488KB"
info Disk size with transitive dependencies: "488KB"
info Number of shared dependencies: 0
The component-library package is my own, which contains a component which imports react-native-picker-select. Commenting out the import solves the "two views" error, but this obviously isn't a fix.
What is the correct way to fix this? Seems to me like the dependency should be shared between the two node modules so only one is registered? Isn't this what is supposed to happen with the hoisting?
The error showed up after updating react-native-picker-select to the latest version (8.0.4) in the component-library node modules. The latest version switched to using #react-native-picker/picker.
Edit: I have a workaround for the issue, but this still isn't a proper fix. Including #react-native-picker/picker in the apps package.json and manually removing node_modules/component-library/node_modules/#react-native-picker/picker at least makes the error disappear and the app run again, with a working react-native-picker-select component.
I cloned the rocket chat repo on GitHub and ran meteor npm install && meteor, it wasn't able to deploy the app and got stuck, so I exited and tried meteor but it throws the same error:
Errors prevented startup:
While loading plugin `Livechat` from package `rocketchat:livechat`:
child_process.js:635:11: Command failed: C:\web dev\RocketChat\Rocket.Chat\packages\rocketchat-livechat\plugin/build.bat
'C:\web' is not recognized as an internal or external command,
operable program or batch file.
at checkExecSyncError (child_process.js:635:11)
at execSync (child_process.js:671:15)
at module (packages/Livechat/plugin/build-livechat.js:20:2)
at fileEvaluate (packages/modules-runtime.js:336:7)
at Module.require (packages/modules-runtime.js:238:14)
at require (packages/modules-runtime.js:258:21)
at <runJavaScript-36>:94:1
at <runJavaScript-36>:99:3
Your application has errors. Waiting for file change.
Started MongoDB.
And gets stuck there.
The issue here is with the space in the name of your web deb folder. This should probably be compensated for in the package code, but since it isn't the easiest solution would be to rename your folder to not have a space in the name and then maybe file a issue in the appropriate repo.
I tried to create a nuxt app with the guide from the official website, chose default options because I wanted the starter template but on running npm run dev, I keep encountering the error:
This relative module was not found:
* ./components/nuxt-error.vue in ./.nuxt/index.js
I've tried searching about it but I couldn't find any useful resource/fix. I've also tried vue init nuxt-community/starter-template for the installation but I still get the same error.
Any fixes?
So I found a solution. I couldn’t figure out the error because the nuxt-error.vue file was actually imported correctly. Turns out “npm” installations have been giving me issues (had issues with TailwindCSS too).
So if you ever encounter this error on loading the base nuxt app, recreate the project using “yarn” instead. Works like magic!
This Error basically means, that in one of your files you are trying to import another file with the relative path of ./components/nuxt-error.vue but no file with this path exists.
However
I just read that vue init nuxt-community/starter-template is deprecated and no longer maintained. Instead of fixing this Error you should restart your project with npx create-nuxt-app <yourAppName>. https://github.com/nuxt-community/starter-template
Anytime I install Library, whether it is, native base or react-native text-input effects.it gives the same error every time..
I don't know what's causing an issue here.
error: bundling failed: Error: While trying to resolve module
native-base` from file `/home/jas/Hopper/screen/Home.js`, the package `
/home/jas/Hopper /node_modules/native-base/package.json` was successfully
found. However, this package itself specifies a `main` module field that
could not be resolved (`/home/jas/Hopper/node_modules/native-base/dist
/src/index.js`. Indeed, none of these files exist:
Delete the build folder in /node_modules/native-base/android/app