原创 React之Could not create a project called "ReactDemo1" because of npm naming restrictions: * name c

Could not create a project called "ReactDemo1" because of npm naming restrictions:   *  name can no longer contain capi

原创 reactnative之vscode調試:Error: 執行命令 react-native run-ios --simulator --no-packager 時出錯

[Error] Error: 執行命令 react-native run-ios --simulator --no-packager 時出錯: 執行命令 react-native run-ios --simulator --no-pack

原创 react之安裝webpack:error An unexpected error occurred: "EACCES: permission denied

error An unexpected error occurred: "EACCES: permission denied, mkdir '/Users/liuzhao/Documents/劉召/RNDemo/2019-7-24/nod

原创 react之運行webpack報錯:configuration.module has an unknown property 'loaders'

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API sc

原创 react之運行webpack報錯ERROR in ./src/index.js 9:0

ERROR in ./src/index.js 9:0 Module parse failed: Unexpected token (9:0) You may need an appropriate loader to handle t

原创 react之運行webpack報錯:Error: Plugin/Preset files are not allowed to export objects, only functions

Error: Plugin/Preset files are not allowed to export objects, only functions     這裏錯誤是因爲 babel 的版本衝突。   因爲 babel 依賴包不兼

原创 react之安裝webpack報錯

node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable f

原创 React項目創建以及webpack配置與熱更新

1、cd到文件夾:我以當前日期爲文件夾名 2、初始化,終端輸入: npm init 回車鍵: 輸入package name,括號內是提示,你可以按照提示輸入,我這就按提示輸入了,回車 version:可以不輸入,就直接回車了 desc

原创 reactnative之npm ERR! code ELIFECYCLE

Error: listen EADDRINUSE: address already in use :::8081     at Server.setupListenHandle [as _listen2] (net.js:1226:14)

原创 react之運行webpack報錯:ERROR in Entry module not found: SyntaxError:

  ERROR in Entry module not found: SyntaxError: 這是因爲 我在webpack.config.js和package.json文件中添加了注視,導致報錯,json中是不能添加註視的   注視

原创 React之npm ERR! [email protected] start: `react-scripts start`

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: `react-scripts start` npm ERR! Exit status 1

原创 ES6 能否使用Object.assign實現深淺拷貝

Object.assign方法是淺拷貝還是深拷貝? 1,普通變量 Js代碼    let obj={name:"zhangsan",colors:["red", "green", "blue"]};   let obj2=Object.a

原创 reac之Error: Cannot find module 'webpack-cli'

    Error: Cannot find module 'webpack-cli'解決辦法: 全局安裝,終端輸入:  npm install webpack-cli -g 如果有權限限制加上sudo:  sudo npm insta

原创 react之運行webpack報錯:Error: Cannot find module '@babel/core'

  那就安裝一個,終端輸入: sudo npm install @babel/core --save

原创 ASP.NET IHttpHandler下的IsReusable屬性

我們平時在開發的時候,經常做一些自定義的HttpHandler,每次再繼承IHttpHandler接口的時候,都要設置IsReusable的值,通常我們都是設置返回true,可是我們要小心這個返回值,因爲設置爲true的時候有很多前提條件