开发搭建

  1. 1s-MacBook-Air-5:~ a1$ cd github
  2. 1s-MacBook-Air-5:github a1$ cd Libplate
  3. 1s-MacBook-Air-5:Libplate a1$ cd ~
  4. 1s-MacBook-Air-5:~ a1$ ls
  5. 8.jpg Music dva-quickstart m-project test.diskqueue.meta.dat
  6. 9.jpg Pictures ffbuild mongo test:nsq_to_file.diskqueue.000000.dat
  7. App Public github mynginx test:nsq_to_file.diskqueue.meta.dat
  8. Applications README.md go mysql test:test-channel.diskqueue.meta.dat
  9. Desktop StudyDocument home node_modules 备份
  10. Documents WeChatProjects iCloud Drive (Archive) nsqd.226.dat 计算机.zip
  11. Downloads _book icon nsqd.dat 未知文件.xxx
  12. GitBook blogs java package-lock.json
  13. Golang doc java_error_in_goland.hprof portainer
  14. Library docker logs profile
  15. Movies draw.io m-proj src
  16. 1s-MacBook-Air-5:~ a1$ mkdir ice
  17. 1s-MacBook-Air-5:~ a1$ cd ice
  18. 1s-MacBook-Air-5:ice a1$ ls -la
  19. total 0
  20. drwxr-xr-x 2 a1 staff 64 4 15 22:06 .
  21. drwxr-xr-x+ 90 a1 staff 2880 4 15 22:06 ..
  22. 1s-MacBook-Air-5:ice a1$ pwd
  23. /Users/a1/ice
  24. 1s-MacBook-Air-5:ice a1$ ls
  25. sample
  26. 1s-MacBook-Air-5:ice a1$ cd sample/
  27. 1s-MacBook-Air-5:sample a1$ ls
  28. README.md client node_modules npm-debug.log package.json server
  29. 1s-MacBook-Air-5:sample a1$ cd client/
  30. 1s-MacBook-Air-5:client a1$ ls
  31. README.md build node_modules npm-debug.log package.json public src tests
  32. 1s-MacBook-Air-5:client a1$ cat package.json
  1. 1s-MacBook-Air-5:client a1$ pwd
  2. /Users/a1/ice/sample/client
  3. 1s-MacBook-Air-5:client a1$ node -v
  4. v10.15.3
  5. 1s-MacBook-Air-5:client a1$ npm start

异步不允许

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass --force to build the binding for your current environment.
电脑的问题 node版本 10.15 比较低,在ice 安装的时候自动跳到 6.11.3版本,不知什么原因。

  1. 1s-MacBook-Air-5:s2 a1$ node -v
  2. v10.15.3
  1. npm ERR! Darwin 17.7.0
  2. npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
  3. npm ERR! node v6.11.3
  4. npm ERR! npm v3.10.10
  5. npm ERR! code ELIFECYCLE
  6. npm ERR! @icedesign/pro-scaffold@1.0.0 start: `ice dev`
  7. npm ERR! Exit status 1
  8. npm ERR!
  9. npm ERR! Failed at the @icedesign/pro-scaffold@1.0.0 start script 'ice dev'.
  10. npm ERR! Make sure you have the latest version of node.js and npm installed.
  11. npm ERR! If you do, this is most likely a problem with the @icedesign/pro-scaffold package,
  12. npm ERR! not with npm itself.
  13. npm ERR! Tell the author that this fails on your system:
  14. npm ERR! ice dev
  15. npm ERR! You can get information on how to open an issue for this project with:
  16. npm ERR! npm bugs @icedesign/pro-scaffold
  17. npm ERR! Or if that isn't available, you can get their info via:
  18. npm ERR! npm owner ls @icedesign/pro-scaffold
  19. npm ERR! There is likely additional logging output above.
  20. npm ERR! Please include the following file with any support request:
  21. npm ERR! /Users/a1/ice/s2/npm-debug.log

修改过程

  1. 1s-MacBook-Air-5:s2 a1$ ls -la
  2. total 56
  3. drwxr-xr-x 14 a1 staff 448 4 15 22:36 .
  4. drwxr-xr-x 4 a1 staff 128 4 15 22:27 ..
  5. -rw-r--r-- 1 a1 staff 197 4 15 22:27 .editorconfig
  6. -rw-r--r-- 1 a1 staff 109 4 15 22:27 .eslintignore
  7. -rw-r--r-- 1 a1 staff 1553 4 15 22:27 .eslintrc
  8. -rw-r--r-- 1 a1 staff 216 4 15 22:27 .gitignore
  9. -rw-r--r-- 1 a1 staff 2650 4 15 22:27 README.md
  10. drwxr-xr-x 6 a1 staff 192 4 15 22:27 build
  11. drwxr-xr-x 1122 a1 staff 35904 4 15 22:36 node_modules
  12. -rw-r--r-- 1 a1 staff 2969 4 15 22:36 npm-debug.log
  13. -rw-r--r-- 1 a1 staff 2806 4 15 22:27 package.json
  14. drwxr-xr-x 4 a1 staff 128 4 15 22:27 public
  15. drwxr-xr-x 16 a1 staff 512 4 15 22:27 src
  16. drwxr-xr-x 3 a1 staff 96 4 15 22:27 tests
  17. 1s-MacBook-Air-5:s2 a1$
  18. 1s-MacBook-Air-5:s2 a1$
  19. 1s-MacBook-Air-5:s2 a1$ rm -rf node_modules
  20. 1s-MacBook-Air-5:s2 a1$ node -v
  21. v10.15.3
  22. 1s-MacBook-Air-5:s2 a1$ npm i

执行结果

  1. 1s-MacBook-Air-5:s2 a1$ npm start
  2. > @icedesign/pro-scaffold@1.0.0 start /Users/a1/ice/s2
  3. > ice dev
  4. ice-scripts 1.9.4
  5. sassInfo node-sass 4.9.0 (Wrapper) [JavaScript]
  6. libsass 3.5.4 (Sass Compiler) [C/C++]
  7. info 使用 buildConfig 自定义 entry src/index.js
  8. info --inject-babel: polyfill
  9. info 使用主题包 @icedesign/theme
  10. 95% emitting
  11. ----项目依赖健康检查-----
  12. WARN 项目依赖了 hoist-non-react-statics 的两个版本, [ '2.5.5', '3.3.0' ]
  13. WARN 项目依赖了 path-to-regexp 的两个版本, [ '2.4.0', '1.7.0' ]
  14. 100%
  15. Starting the development server...
  16. - Local: http://localhost:4444/
  17. - Network: http://192.168.0.107:4444/
  18. Hash: a4dd7119757cf8506fdb
  19. Version: webpack 4.28.4
  20. Time: 22724ms
  21. Built at: 2019-04-15 23:01:27
  22. Asset Size Chunks Chunk Names
  23. css/1.css 485 bytes 1 [emitted]
  24. js/index.js.map 8.84 MiB index [emitted] index
  25. Entrypoint index = css/index.css js/index.js css/index.css.map js/index.js.map
  26. info Compiled successfully in 22.7s!
  27. Compiling...
  28. 95% emitting
  29. ----项目依赖健康检查-----
  30. WARN 项目依赖了 hoist-non-react-statics 的两个版本, [ '2.5.5', '3.3.0' ]
  31. WARN 项目依赖了 path-to-regexp 的两个版本, [ '2.4.0', '1.7.0' ]
  32. 100%
  33. Hash: 5ec523ca876830aafa46
  34. Version: webpack 4.28.4
  35. Time: 1638ms
  36. Built at: 2019-04-15 23:02:44
  37. Asset Size Chunks Chunk Names
  38. 1.a4dd7119757cf8506fdb.hot-update.js 901 bytes 1 [emitted]
  39. js/index.js.map 8.87 MiB index [emitted] index
  40. Entrypoint index = css/index.css js/index.js index.a4dd7119757cf8506fdb.hot-update.js css/index.css.map js/index.js.map index.a4dd7119757cf8506fdb.hot-update.js.map
  41. info Compiled successfully in 1.6s!
  42. Compiling...
  43. 95% emitting
  44. ----项目依赖健康检查-----
  45. WARN 项目依赖了 hoist-non-react-statics 的两个版本, [ '2.5.5', '3.3.0' ]
  46. WARN 项目依赖了 path-to-regexp 的两个版本, [ '2.4.0', '1.7.0' ]
  47. 100%
  48. Hash: 532cf698fb3637d869aa
  49. Version: webpack 4.28.4
  50. Time: 1876ms
  51. Built at: 2019-04-15 23:03:47
  52. Asset Size Chunks Chunk Names
  53. 4167bb9ab39fb086a5c8.hot-update.json 44 bytes [emitted]
  54. js/index.js.map 8.92 MiB index [emitted] index
  55. Entrypoint index = css/index.css js/index.js index.5ec523ca876830aafa46.hot-update.js css/index.css.map js/index.js.map index.5ec523ca876830aafa46.hot-update.js.map
  56. info Compiled successfully in 1.9s!