stkevintan / canoe-blog

blog
https://keyin.me
51 stars 20 forks source link

install the node dependencies 😭 install 不了 #7

Open Mason-Xu opened 6 years ago

Mason-Xu commented 6 years ago

非常喜欢这个主题,,,就是没有学过前端,不知道怎么弄 😭

stkevintan commented 6 years ago

首先安装nodejs,下载镜像 然后打开命令行,在项目目录里面执行:

npm install --registry=https://registry.npm.taobao.org

PS: 后面那个参数是为了使用淘宝的仓库

Mason-Xu commented 6 years ago

还是err,哎😐

stkevintan commented 6 years ago

那就贴err,把你做的步骤贴出来(元旦不陪妹子跨年,还搞这些干啥子呦🌚

lesoleil commented 6 years ago

同无法安装啊 ``E:\zhangzp\canoe-blog-master (canoe-blog@1.0.0) λ yarn global add gulp yarn global v1.3.2 [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... success Installed "gulp@3.9.1" with binaries:

E:\zhangzp\canoe-blog-master (canoe-blog@1.0.0) λ yarn install yarn install v1.3.2 info No lockfile found. [1/4] Resolving packages... warning gulp > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 warning gulp > vinyl-fs > graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js warning gulp > vinyl-fs > glob-stream > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue warning gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue warning gulp > vinyl-fs > glob-watcher > gaze > globule > glob > graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js warning gulp-clean > gulp-util@2.2.20: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 warning gulp-clean > through2 > xtend > object-keys@0.4.0: warning gulp-htmlmin > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 warning gulp-imagemin > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 warning gulp-imagemin > imagemin-optipng > optipng-bin > bin-wrapper > download > gulp-decompress > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 warning gulp-plumber > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 warning gulp-sass > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 [2/4] Fetching packages... info fsevents@1.1.3: The platform "win32" is incompatible with this module. info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... [1/7] ⠠ uws [6/7] ⠠ nodejieba: E:\zhangzp\canoe-blog-master\node_modules\nodejieba\build\nodeji [-/7] ⠠ waiting... [7/7] ⠐ pngquant-bin error E:\zhangzp\canoe-blog-master\node_modules\nodejieba: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: E:\zhangzp\canoe-blog-master\node_modules\nodejieba Output: E:\zhangzp\canoe-blog-master\node_modules\nodejieba>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) gyp info it worked if it ends with ok gyp info using node-gyp@3.6.1 gyp info using node@8.0.0 | win32 | x64 gyp info spawn C:\Python27\python.EXE gyp info spawn args [ 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-G', gyp info spawn args 'msvs_version=auto', gyp info spawn args '-I', gyp info spawn args 'E:\zhangzp\canoe-blog-master\node_modules\nodejieba\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\Administrator\.node-gyp\8.0.0\include\node\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\Users\Administrator\.node-gyp\8.0.0', gyp info spawn args '-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=node.lib', gyp info spawn args '-Dmodule_root_dir=E:\zhangzp\canoe-blog-master\node_modules\nodejieba', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'E:\zhangzp\canoe-blog-master\node_modules\nodejieba\build', gyp info spawn args '-Goutput_dir=.' ] gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe gyp info spawn args [ 'build/binding.sln', gyp info spawn args '/clp:Verbosity=minimal', gyp info spawn args '/nologo', gyp info spawn args '/p:Configuration=Release;Platform=x64' ] 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。 E:\zhangzp\canoe-blog-master\node_modules\nodejieba\build\nodejieba.vcxproj(20,3): error MSB4019: 未找到导入的项目“E:\Microsoft.Cpp.Default.props”。请确认 声明中的路径正确, 且磁盘上存在该文件。 gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:285:23) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)gyp ERR! System Windows_NT 10.0.16299 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd E:\zhangzp\canoe-blog-master\node_modules\nodejieba``

stkevintan commented 6 years ago

这是nodejieba在windows上安装的问题。可以参考一下: https://github.com/yanyiwu/nodejieba/issues/70

lesoleil commented 6 years ago

确实,不过我按照参考操作之后nodejieba依旧无法安装,已经放弃windows了,Linux无任何错误

C:\Users\Administrator\.node-gyp\8.0.0\Release\node.lib : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2DB9F4 [E:\zhangzp\canoe-blog-master\node_modules\nodejieba\build\nodejieba.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:285:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\zhangzp\canoe-blog-master\node_modules\nodejieba
stkevintan commented 6 years ago

我的天,看来nodejieba在windows上真的坑的不行

Mason-Xu commented 6 years ago
  1. npm install nodejieba -g --registry=https://registry.npm.taobao.org 安装nodejieba
  2. npm install -g node-gyp --registry=https://registry.npm.taobao.org 安装 node-gyb
  3. 还有 python要 2.7 😄 Install Error: Can't find Python executable #28
    npm --add-python-to-path='true' --debug install --global windows-build-tools @lesoleil
lesoleil commented 6 years ago

@Mason-Xu 非常感谢,不过我放弃Win了 = =