Posts

Showing posts from July, 2019

npm ERR: Hostname/IP does not match certificate's altnames

Sometimes when build a node docker image will get this error: npm ERR! request to https://registry.npmjs.org/express failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net The solution is to change registry address, in dockerfile, we can add the following: FROM node WORKDIR /app COPY package.json /app RUN npm config set registry http://othermirro/ RUN npm config set strict-ssl false RUN npm install COPY . ./app CMD ["npm", "start"]

Xcode 11 Error: "Unknown argument type '__attribute__' in method -[RCTAppState getCurrentAppState:error:]. Extend RCTConvert to support this type."

According the official issue : https://github.com/facebook/react-native/issues/25138 iOS build fails to run in with Xcode 11.0 beta This is a 0.59 version bug. If you have want to fix it by youself, please check this out: https://github.com/facebook/react-native/pull/25146. react-native/React/Base/RCTModuleMethod.mm line94: RCTReadString(input, "__attribute__((__unused__))") ||

NPM start Error: jest-haste-map: Haste module naming collision

The error details when npm run start: Loading dependency graph...(node:19540) UnhandledPromiseRejectionWarning: Error: jest-haste-map: Haste module naming collision: Duplicate module name: fbjs Paths: /Users/adam/Example/node_modules/create-react-class/node_modules/fbjs/package.json collides with /Users/adam/Example/node_modules/fbjs/package.json This error is caused by `hasteImpl` returning the same name for different files. at setModule (/Users/adam/Example/node_modules/jest-haste-map/build/index.js:569:17) at workerReply (/Users/adam/Example/node_modules/jest-haste-map/build/index.js:641:9) at at process._tickCallback (internal/process/next_tick.js:188:7) (node:19540) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:19540) [DEP0018] DeprecationWarning: Unhandle...

Xcode compile error: 'boost/config/user.hpp' file not found"

There is always an compiled error when running xcode with react-native recently: Lexical or Preprocessor Issue Group: ...node_modules/react-native/third-party/boost_1_63_0/boost/config.hpp:30:12: 'boost/config/user.hpp' file not found Current solution is to download new boost, extract it and then overwrite it in the react-native/third-party folder. It works but too slowly, you need to copy over 100MB files. I try to just copy config folder, but seems not work. This problem has been occured in several projects. The last solution is clean the cache: rm -rf ~/.rncache rm -rf node_modules/react-native/third-party