English 中文(简体)
npx 反应- 本地链接命令的替代
原标题:alternative for npx react-native link command

此命令不工作将资产与工程连接 。

npx react-native link

错误写道:

未知命令链接

将资产与项目应用程序连接到响应本地程序

即使我使用 npx 反应- native- asset 命令。, 我仍然面临错误 :

$ npx react-native-asset
node:fs:1643
  const stats = binding.lstat(
                        ^

Error: ENOENT: no such file or directory, lstat  C:UsersdbznaDesktopmern stacklooddonation1clientassetsfonts 
    at Object.lstatSync (node:fs:1643:25)
    at loadAsset (C:UsersdbznaAppDataLocal
pm-cache\_npx545c366a5ae830a2
ode_modules
eact-native-assetlibindex.js:80:22)
    at Array.forEach (<anonymous>)
    at C:UsersdbznaAppDataLocal
pm-cache\_npx545c366a5ae830a2
ode_modules
eact-native-assetlibindex.js:94:15
    at Array.forEach (<anonymous>)
    at module.exports (C:UsersdbznaAppDataLocal
pm-cache\_npx545c366a5ae830a2
ode_modules
eact-native-assetlibindex.js:288:6)     
    at Object.<anonymous> (C:UsersdbznaAppDataLocal
pm-cache\_npx545c366a5ae830a2
ode_modules
eact-native-assetlibcli.js:56:1)    
    at Module._compile (node:internal/modules/cjs/loader:1376:14)     
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32) {       
  errno: -4058,
  code:  ENOENT ,
  syscall:  lstat ,
  path:  C:\Users\dbzna\Desktop\mern stack\blooddonation1\client\assets\fonts 
}

Node.js v20.11.1

问题回答

I had the same problem, the solution was to check the file react-native.config.js checking the route that was in assets I had it wrong.





相关问题
HandleClick not being recognized as a prop

I m trying to get my menu to show when I click the sidebar, but I m getting an error "react-dom.development.js:86 Warning: React does not recognize the handleClick prop on a DOM " import { ...

Is there an equivalent to localStorage in React Native?

I d like to implement the equivalent to the javascript localStorage in my React Native app. But I m unsure how to set. To function how I want it to, I would like the localStorage to be stored every ...

Video Calling in Expo React Native Application

I am building a React Native Application using Expo and I want to integrate a 1:1 video calling functionality in the app. From what I have researched so far on the topic is that I can use SDKs of ...

热门标签