2023年6月21日发(作者:)
node-sass安装失败的各种坑开始的时候引⼊别⼈的⼀个项⽬npm installnpm run dev 启动项⽬报错> sell@1.0.0 dev E:web_hwfVue02app> node build/ening at localhost:8888webpack: wait until bundle finished: /bpack built 5301489d16ee90d86896 in 3165msHash: 5301489d16ee90d86896Version: webpack 1.15.0Time: 3165ms Asset Size Chunks Chunk 1.96 MB 0 appERROR in Cannot find module 'node-sass' @ ./src/common/scss/ 4:14-124 13:2-17:4 14:20-130ERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-e0c3a2e6!./~/sass-loader!./~/vue-loader/lib/?type=styles&index=0!./srERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-690f3aee&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-2ac60e2e&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-17cac44c&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-108aa294&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-13f047fa&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=styles&ERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-bbdb154c&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-652a5408&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-1728dbcc&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-40efc97a&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass'Child html-webpack-plugin for "": Asset Size Chunks Chunk Names 1.47 MB 0webpack: Failed to compile. @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-617e6f7a&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesnpm i node-sass -s安装报错E:kibana>npm install node-sass> node-sass@3.8.0 install E:kibananode_modulesnode-sass> node scripts/ot download "/sass/node-sass/releases/download/v3.8.0/win32-x64-48_":tunneling socket could not be established, cause=socket hang upHint: If is not accessible in your location try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=:1234or configure npm proxy via npm config set proxy :8080> node-sass@3.8.0 postinstall E:kibananode_modulesnode-sass> node scripts/ding: D:Program E:kibananode_ rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=gyp info it worked if it ends with okgyp verb cli [ 'D:Program ',gyp verb cli 'E:kibananode_',gyp verb cli 'rebuild',gyp verb cli '--verbose',gyp verb cli '--libsass_ext=',gyp verb cli '--libsass_cflags=',gyp verb cli '--libsass_ldflags=',gyp verb cli '--libsass_library=' ]gyp info using node-gyp@3.6.0gyp info using node@6.2.0 | win32 | x64gyp verb command rebuild []gyp verb command clean []gyp verb clean removing "build" directorygyp verb command configure []gyp verb check python checking for Python executable "python2" in the PATHgyp verb `which` failed Error: not found: python2gyp verb `which` failed at getNotFoundError (E:kibananode_:13:12)gyp verb `which` failed at F (E:kibananode_:68:19)gyp verb `which` failed at E (E:kibananode_:80:29)gyp verb `which` failed at E:kibananode_:89:16gyp verb `which` failed at E:kibananode_:42:5gyp verb `which` failed at E:kibananode_:36:5gyp verb `which` failed at lete (:117:15)gyp verb `which` failed python2 { Error: not found: python2gyp verb `which` failed at getNotFoundError (E:kibananode_moduleswhichwhgyp verb `which` failed at getNotFoundError (E:kibananode_:13:12)gyp verb `which` failed at F (E:kibananode_:68:19)gyp verb `which` failed at E (E:kibananode_:80:29)gyp verb `which` failed at E:kibananode_:89:16gyp verb `which` failed at E:kibananode_:42:5gyp verb `which` failed at E:kibananode_:36:5gyp verb `which` failed at lete (:117:15) code: 'ENOENT' }gyp verb check python checking for Python executable "python" in the PATHgyp verb `which` succeeded python C: verb check python version `C: -c "import platform; print(_version());"` returned: "2.7.12rn"gyp verb get node dir no --target version specified, falling back to host node version: 6.2.0gyp verb command install [ '6.2.0' ]gyp verb install input version string "6.2.0"gyp verb install installing version: 6.2.0gyp verb install --ensure was passed, so won't reinstall if already installedgyp verb install version is already installed, need to check "installVersion"gyp verb got "installVersion" 9gyp verb needs "installVersion" 9gyp verb install version is goodgyp verb get node dir target node version installed: 6.2.0gyp verb build dir attempting to create "build" dir: E:kibananode_modulesnode-sassbuildgyp verb build dir "build" dir needed to be created? E:kibananode_modulesnode-sassbuildgyp verb Not using VS2017: Could not use PowerShell to find VS2017gyp verb build/ creating config filegyp verb build/ writing out config file: E:kibananode_p verb checking for gypi file: E:kibananode_p verb checking for gypi file: E:kibananode_p verb gyp gyp format was not specified; forcing "msvs"gyp info spawn C: info spawn args [ 'E:kibananode_modulesnode-gypgypgyp_',gyp info spawn args '',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:kibananode_',gyp info spawn args '-I',gyp info spawn args 'E:kibananode_',gyp info spawn args '-I',gyp info spawn args 'C:',gyp info spawn args '-Dlibrary=shared_library',gyp info spawn args '-Dvisibility=default',gyp info spawn args '-Dnode_root_dir=C:-gyp6.2.0',gyp info spawn args '-Dnode_gyp_dir=E:kibananode_modulesnode-gyp',gyp info spawn args '-Dnode_lib_file=',gyp info spawn args '-Dmodule_root_dir=E:kibananode_modulesnode-sass',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:kibananode_modulesnode-sassbuild',gyp info spawn args '-Goutput_dir=.' ]gyp verb command build []gyp verb build type Releasegyp verb architecture x64gyp verb architecture x64gyp verb node dev dir C:-gyp6.2.0gyp verb found first Solution file build/ verb could not find "" in PATH - finding location in registrygyp verb "Release" dir needed to be created? nullgyp verb copying "" for x64 C: info spawn C: info spawn args [ 'build/',gyp info spawn args '/nologo',gyp info spawn args '/p:Configuration=Release;Platform=x64' ]Build started 2017/4/15 11:57:t "E:kibananode_" on node 1 (default targets).ValidateSolutionConfiguration: Building solution configuration "Release|x64".MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“”。要解决此问题,1) 安装 .NET Framework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了其他位置,请将其位置添加到系统路径中。 [E:kibananode_]Done Building Project "E:kibananode_" (default targets) -- FAILED."E:kibananode_" (default target) (1) ->(_src_libsass target) -> MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“”。要解决此问题,1) 安装 .NET Framework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了其他位置,请将其位置添加到系统路径中。 [E:kibananode_] 0 Warning(s) 1 Error(s)Time Elapsed 00:00:00.23gyp ERR! build errorgyp ERR! stack Error: `C:` failed with exit code: 1gyp ERR! stack at (E:kibananode_:285:23)gyp ERR! stack at emitTwo (:106:13)gyp ERR! stack at (:191:7)gyp ERR! stack at rocess._ (internal/child_:204:12)gyp ERR! System Windows_NT 6.1.7601gyp ERR! command "D:Program " "E:kibananode_" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="gyp ERR! cwd E:kibananode_modulesnode-sassgyp ERR! node -v v6.2.0gyp ERR! node-gyp -v v3.6.0gyp ERR! not okBuild failednpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modulesbabel-clinode_moduleschokidarnode_modulesfsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_moduleschokidarnode_modulesfsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_moduleswatchpacknode_moduleschokidarnode_modulesfsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm WARN grunt-angular-translate@0.3.0 requires a peer of grunt@~0.4.0 but nonewas ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! node-sass@3.8.0 postinstall: `node scripts/`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@3.8.0 postinstall script 'node scripts/'.npm ERR! Make sure you have the latest version of and npm ERR! If you do, this is most likely a problem with the node-sass package,npm ERR! not with npm ERR! Tell the author that this fails on your system:npm ERR! node scripts/ ERR! You can get information on how to open an issue for this project with:npm ERR! npm bugs node-sassnpm ERR! Or if that isn't available, you can get their info via:npm ERR! npm owner ls node-sassnpm ERR! There is likely additional logging output ERR! A complete log of this run can be found in:npm ERR! C:Users15061857AppDataRoamingnpm-cache_logs2017-04-15T03_57_07_百度了很久 ,最后 gyp ERR! build error 应该是没有安装什么解决办法: 解决办法:主要是windows平台缺少编译环境,
1、先运⾏: npm install -g node-gyp
2、然后运⾏:运⾏
npm install --global --production windows-build-tools 可以⾃动安装跨平台的编译器:gym注:第⼆句执⾏下载好msi⽂件卡着不懂不安装 , ⼿动去对应的⽬录底下安装⼀下 在执⾏⼀边。本以为万事⼤吉 ⼀执⾏ npm install node-sass --save-dev 悲剧的事情上演了> node-sass@3.13.1 install E:web_hwfVue02appnode_modulesnode-sass> node scripts/loading binary from /sass/node-sass/releases/download/v3.13.1/win32-x64-64_nnot download "/sass/node-sass/releases/download/v3.13.1/win32-x64-64_":HTTP error 404 Not FoundHint: If is not accessible in your location try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=:1234or configure npm proxy via npm config set proxy :8080> node-sass@3.13.1 postinstall E:web_hwfVue02appnode_modulesnode-sass> node scripts/ info it worked if it ends with okgyp verb cli [ 'E:26_',gyp verb cli 'E:web_hwfVue02appnode_',gyp verb cli 'rebuild',gyp verb cli '--verbose',gyp verb cli '--libsass_ext=',gyp verb cli '--libsass_cflags=',gyp verb cli '--libsass_ldflags=',gyp verb cli '--libsass_library=' ]gyp info using node-gyp@3.6.2gyp info using node@10.1.0 | win32 | x64Building: E:26_ E:web_hwfVue02appnode_ rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflagyp info using node@10.1.0 | win32 | x64gyp verb command rebuild []gyp verb command clean []gyp verb clean removing "build" directorygyp verb command configure []gyp verb check python checking for Python executable "C:" in the PATHgyp verb `which` succeeded C: C: verb check python version `C: -c "import platform; print(_version());"` returned: "2.7.14rn"gyp verb get node dir no --target version specified, falling back to host node version: 10.1.0gyp verb command install [ '10.1.0' ]gyp verb install input version string "10.1.0"gyp verb install installing version: 10.1.0gyp verb install --ensure was passed, so won't reinstall if already installedgyp verb install version is already installed, need to check "installVersion"gyp verb got "installVersion" 9gyp verb needs "installVersion" 9gyp verb install version is goodgyp verb get node dir target node version installed: 10.1.0gyp verb build dir attempting to create "build" dir: E:web_hwfVue02appnode_modulesnode-sassbuildgyp verb build dir "build" dir needed to be created? E:web_hwfVue02appnode_modulesnode-sassbuildgyp verb build/ creating config filegyp verb build/ writing out config file: E:web_hwfVue02appnode_p verb checking for gypi file: E:web_hwfVue02appnode_p verb checking for gypi file: E:web_hwfVue02appnode_p verb gyp gyp format was not specified; forcing "msvs"gyp info spawn C: info spawn args [ 'E:web_hwfVue02appnode_modulesnode-gypgypgyp_',gyp info spawn args '',gyp info spawn args '-f',gyp info spawn args 'msvs',gyp info spawn args '-G',gyp info spawn args 'msvs_version=2015',gyp info spawn args '-I',gyp info spawn args 'E:web_hwfVue02appnode_',gyp info spawn args '-I',gyp info spawn args 'E:web_hwfVue02appnode_',gyp info spawn args '-I',gyp info spawn args 'C:',gyp info spawn args '-Dlibrary=shared_library',gyp info spawn args '-Dvisibility=default',gyp info spawn args '-Dnode_root_dir=C:-gyp10.1.0',gyp info spawn args '-Dnode_gyp_dir=E:web_hwfVue02appnode_modulesnode-gyp',gyp info spawn args '-Dnode_lib_file=C:-gyp10.1.0<(target_arch)',gyp info spawn args '-Dmodule_root_dir=E:web_hwfVue02appnode_modulesnode-sass',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:web_hwfVue02appnode_modulesnode-sassbuild',gyp info spawn args '-Goutput_dir=.' ]gyp verb command build []gyp verb build type Releasegyp verb architecture x64gyp verb node dev dir C:-gyp10.1.0gyp verb found first Solution file build/ verb could not find "" in PATH - finding location in registrygyp info spawn C: info spawn args [ 'build/',gyp info spawn args '/nologo',gyp info spawn args '/p:Configuration=Release;Platform=x64' ]Building the projects in this solution one at a time. To enable parallel build, please add the "/m" started 2018/6/6 15:52:t "E:web_hwfVue02appnode_" on node 1 (default targets).ValidateSolutionConfiguration: Building solution configuration "Release|x64".Project "E:web_hwfVue02appnode_" (1) is building "E:web_hwfVue02appnode_Project "E:web_hwfVue02appnode_oj" (2) is building "E:web_hwfVue02appnode_modulesnode-sassDone Building Project "E:web_hwfVue02appnode_j" (default targets) -- Building Project "E:web_hwfVue02appnode_oj" (default targets) -- Building Project "E:web_hwfVue02appnode_" (default targets) -- FAILED."E:web_hwfVue02appnode_" (default target) (1) ->"E:web_hwfVue02appnode_oj" (default target) (2) ->"E:web_hwfVue02appnode_j" (default target) (3) -> 0 Warning(s) 1 Error(s)Time Elapsed 00:00:00.07gyp ERR! build errorgyp ERR! stack Error: `C:` failed with exit code: 1gyp ERR! stack at (E:web_hwfVue02appnode_:258:23)gyp ERR! stack at (:182:13)gyp ERR! stack at rocess._ (internal/child_:235:12)gyp ERR! System Windows_NT 6.1.7601gyp ERR! cwd E:web_hwfVue02appnode_modulesnode-sassgyp ERR! node -v v10.1.0gyp ERR! node-gyp -v v3.6.2gyp ERR! not okBuild failed with error code: 1npm WARN eslint-config-standard@6.2.1 requires a peer of eslint-plugin-promise@>=3.3.0 but none is installed. You must install peer dependencies WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modulesfsevents):npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! node-sass@3.13.1 postinstall: `node scripts/`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@3.13.1 postinstall ERR! This is probably not a problem with npm. There is likely additional logging output ERR! A complete log of this run can be found in:npm ERR! C:UsersAdministratorAppDataRoamingnpm-cache_logs2018-06-06T07_52_55_:web_hwfVue02appnode_j(20,3): error MSB4019: The imported project "E:" was not f E:web_hwfVue02appnode_j(20,3): error MSB4019: The imported project "E:" was notgyp ERR! command "E:26_" "E:web_hwfVue02appnode_" "rebuild" "--verbose" "--libsass_ext=" "--libsnpm WARN rollback Rolling back source-map@0.4.4 failed (this is probably harmless): EPERM: operation not permitted, lstat 'E:web_hwfVue02appnode_modunpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","a解决办法:保存后 删除之前安装失败的包(第⼀次安装请跳过此步)npm uninstall
node-sass重新安装npm install
node-sass终于可以了终于可以了终于可以了中间安装过程中⼀些淘宝镜像 安装路径的这些简单问题就不说了
2023年6月21日发(作者:)
node-sass安装失败的各种坑开始的时候引⼊别⼈的⼀个项⽬npm installnpm run dev 启动项⽬报错> sell@1.0.0 dev E:web_hwfVue02app> node build/ening at localhost:8888webpack: wait until bundle finished: /bpack built 5301489d16ee90d86896 in 3165msHash: 5301489d16ee90d86896Version: webpack 1.15.0Time: 3165ms Asset Size Chunks Chunk 1.96 MB 0 appERROR in Cannot find module 'node-sass' @ ./src/common/scss/ 4:14-124 13:2-17:4 14:20-130ERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-e0c3a2e6!./~/sass-loader!./~/vue-loader/lib/?type=styles&index=0!./srERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-690f3aee&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-2ac60e2e&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-17cac44c&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-108aa294&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-13f047fa&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=styles&ERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-bbdb154c&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-652a5408&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-1728dbcc&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass' @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-40efc97a&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesERROR in Cannot find module 'node-sass'Child html-webpack-plugin for "": Asset Size Chunks Chunk Names 1.47 MB 0webpack: Failed to compile. @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/?id=data-v-617e6f7a&scoped=true!./~/sass-loader!./~/vue-loader/lib/?type=stylesnpm i node-sass -s安装报错E:kibana>npm install node-sass> node-sass@3.8.0 install E:kibananode_modulesnode-sass> node scripts/ot download "/sass/node-sass/releases/download/v3.8.0/win32-x64-48_":tunneling socket could not be established, cause=socket hang upHint: If is not accessible in your location try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=:1234or configure npm proxy via npm config set proxy :8080> node-sass@3.8.0 postinstall E:kibananode_modulesnode-sass> node scripts/ding: D:Program E:kibananode_ rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=gyp info it worked if it ends with okgyp verb cli [ 'D:Program ',gyp verb cli 'E:kibananode_',gyp verb cli 'rebuild',gyp verb cli '--verbose',gyp verb cli '--libsass_ext=',gyp verb cli '--libsass_cflags=',gyp verb cli '--libsass_ldflags=',gyp verb cli '--libsass_library=' ]gyp info using node-gyp@3.6.0gyp info using node@6.2.0 | win32 | x64gyp verb command rebuild []gyp verb command clean []gyp verb clean removing "build" directorygyp verb command configure []gyp verb check python checking for Python executable "python2" in the PATHgyp verb `which` failed Error: not found: python2gyp verb `which` failed at getNotFoundError (E:kibananode_:13:12)gyp verb `which` failed at F (E:kibananode_:68:19)gyp verb `which` failed at E (E:kibananode_:80:29)gyp verb `which` failed at E:kibananode_:89:16gyp verb `which` failed at E:kibananode_:42:5gyp verb `which` failed at E:kibananode_:36:5gyp verb `which` failed at lete (:117:15)gyp verb `which` failed python2 { Error: not found: python2gyp verb `which` failed at getNotFoundError (E:kibananode_moduleswhichwhgyp verb `which` failed at getNotFoundError (E:kibananode_:13:12)gyp verb `which` failed at F (E:kibananode_:68:19)gyp verb `which` failed at E (E:kibananode_:80:29)gyp verb `which` failed at E:kibananode_:89:16gyp verb `which` failed at E:kibananode_:42:5gyp verb `which` failed at E:kibananode_:36:5gyp verb `which` failed at lete (:117:15) code: 'ENOENT' }gyp verb check python checking for Python executable "python" in the PATHgyp verb `which` succeeded python C: verb check python version `C: -c "import platform; print(_version());"` returned: "2.7.12rn"gyp verb get node dir no --target version specified, falling back to host node version: 6.2.0gyp verb command install [ '6.2.0' ]gyp verb install input version string "6.2.0"gyp verb install installing version: 6.2.0gyp verb install --ensure was passed, so won't reinstall if already installedgyp verb install version is already installed, need to check "installVersion"gyp verb got "installVersion" 9gyp verb needs "installVersion" 9gyp verb install version is goodgyp verb get node dir target node version installed: 6.2.0gyp verb build dir attempting to create "build" dir: E:kibananode_modulesnode-sassbuildgyp verb build dir "build" dir needed to be created? E:kibananode_modulesnode-sassbuildgyp verb Not using VS2017: Could not use PowerShell to find VS2017gyp verb build/ creating config filegyp verb build/ writing out config file: E:kibananode_p verb checking for gypi file: E:kibananode_p verb checking for gypi file: E:kibananode_p verb gyp gyp format was not specified; forcing "msvs"gyp info spawn C: info spawn args [ 'E:kibananode_modulesnode-gypgypgyp_',gyp info spawn args '',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:kibananode_',gyp info spawn args '-I',gyp info spawn args 'E:kibananode_',gyp info spawn args '-I',gyp info spawn args 'C:',gyp info spawn args '-Dlibrary=shared_library',gyp info spawn args '-Dvisibility=default',gyp info spawn args '-Dnode_root_dir=C:-gyp6.2.0',gyp info spawn args '-Dnode_gyp_dir=E:kibananode_modulesnode-gyp',gyp info spawn args '-Dnode_lib_file=',gyp info spawn args '-Dmodule_root_dir=E:kibananode_modulesnode-sass',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:kibananode_modulesnode-sassbuild',gyp info spawn args '-Goutput_dir=.' ]gyp verb command build []gyp verb build type Releasegyp verb architecture x64gyp verb architecture x64gyp verb node dev dir C:-gyp6.2.0gyp verb found first Solution file build/ verb could not find "" in PATH - finding location in registrygyp verb "Release" dir needed to be created? nullgyp verb copying "" for x64 C: info spawn C: info spawn args [ 'build/',gyp info spawn args '/nologo',gyp info spawn args '/p:Configuration=Release;Platform=x64' ]Build started 2017/4/15 11:57:t "E:kibananode_" on node 1 (default targets).ValidateSolutionConfiguration: Building solution configuration "Release|x64".MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“”。要解决此问题,1) 安装 .NET Framework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了其他位置,请将其位置添加到系统路径中。 [E:kibananode_]Done Building Project "E:kibananode_" (default targets) -- FAILED."E:kibananode_" (default target) (1) ->(_src_libsass target) -> MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“”。要解决此问题,1) 安装 .NET Framework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了其他位置,请将其位置添加到系统路径中。 [E:kibananode_] 0 Warning(s) 1 Error(s)Time Elapsed 00:00:00.23gyp ERR! build errorgyp ERR! stack Error: `C:` failed with exit code: 1gyp ERR! stack at (E:kibananode_:285:23)gyp ERR! stack at emitTwo (:106:13)gyp ERR! stack at (:191:7)gyp ERR! stack at rocess._ (internal/child_:204:12)gyp ERR! System Windows_NT 6.1.7601gyp ERR! command "D:Program " "E:kibananode_" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="gyp ERR! cwd E:kibananode_modulesnode-sassgyp ERR! node -v v6.2.0gyp ERR! node-gyp -v v3.6.0gyp ERR! not okBuild failednpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modulesbabel-clinode_moduleschokidarnode_modulesfsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_moduleschokidarnode_modulesfsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_moduleswatchpacknode_moduleschokidarnode_modulesfsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm WARN grunt-angular-translate@0.3.0 requires a peer of grunt@~0.4.0 but nonewas ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! node-sass@3.8.0 postinstall: `node scripts/`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@3.8.0 postinstall script 'node scripts/'.npm ERR! Make sure you have the latest version of and npm ERR! If you do, this is most likely a problem with the node-sass package,npm ERR! not with npm ERR! Tell the author that this fails on your system:npm ERR! node scripts/ ERR! You can get information on how to open an issue for this project with:npm ERR! npm bugs node-sassnpm ERR! Or if that isn't available, you can get their info via:npm ERR! npm owner ls node-sassnpm ERR! There is likely additional logging output ERR! A complete log of this run can be found in:npm ERR! C:Users15061857AppDataRoamingnpm-cache_logs2017-04-15T03_57_07_百度了很久 ,最后 gyp ERR! build error 应该是没有安装什么解决办法: 解决办法:主要是windows平台缺少编译环境,
1、先运⾏: npm install -g node-gyp
2、然后运⾏:运⾏
npm install --global --production windows-build-tools 可以⾃动安装跨平台的编译器:gym注:第⼆句执⾏下载好msi⽂件卡着不懂不安装 , ⼿动去对应的⽬录底下安装⼀下 在执⾏⼀边。本以为万事⼤吉 ⼀执⾏ npm install node-sass --save-dev 悲剧的事情上演了> node-sass@3.13.1 install E:web_hwfVue02appnode_modulesnode-sass> node scripts/loading binary from /sass/node-sass/releases/download/v3.13.1/win32-x64-64_nnot download "/sass/node-sass/releases/download/v3.13.1/win32-x64-64_":HTTP error 404 Not FoundHint: If is not accessible in your location try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=:1234or configure npm proxy via npm config set proxy :8080> node-sass@3.13.1 postinstall E:web_hwfVue02appnode_modulesnode-sass> node scripts/ info it worked if it ends with okgyp verb cli [ 'E:26_',gyp verb cli 'E:web_hwfVue02appnode_',gyp verb cli 'rebuild',gyp verb cli '--verbose',gyp verb cli '--libsass_ext=',gyp verb cli '--libsass_cflags=',gyp verb cli '--libsass_ldflags=',gyp verb cli '--libsass_library=' ]gyp info using node-gyp@3.6.2gyp info using node@10.1.0 | win32 | x64Building: E:26_ E:web_hwfVue02appnode_ rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflagyp info using node@10.1.0 | win32 | x64gyp verb command rebuild []gyp verb command clean []gyp verb clean removing "build" directorygyp verb command configure []gyp verb check python checking for Python executable "C:" in the PATHgyp verb `which` succeeded C: C: verb check python version `C: -c "import platform; print(_version());"` returned: "2.7.14rn"gyp verb get node dir no --target version specified, falling back to host node version: 10.1.0gyp verb command install [ '10.1.0' ]gyp verb install input version string "10.1.0"gyp verb install installing version: 10.1.0gyp verb install --ensure was passed, so won't reinstall if already installedgyp verb install version is already installed, need to check "installVersion"gyp verb got "installVersion" 9gyp verb needs "installVersion" 9gyp verb install version is goodgyp verb get node dir target node version installed: 10.1.0gyp verb build dir attempting to create "build" dir: E:web_hwfVue02appnode_modulesnode-sassbuildgyp verb build dir "build" dir needed to be created? E:web_hwfVue02appnode_modulesnode-sassbuildgyp verb build/ creating config filegyp verb build/ writing out config file: E:web_hwfVue02appnode_p verb checking for gypi file: E:web_hwfVue02appnode_p verb checking for gypi file: E:web_hwfVue02appnode_p verb gyp gyp format was not specified; forcing "msvs"gyp info spawn C: info spawn args [ 'E:web_hwfVue02appnode_modulesnode-gypgypgyp_',gyp info spawn args '',gyp info spawn args '-f',gyp info spawn args 'msvs',gyp info spawn args '-G',gyp info spawn args 'msvs_version=2015',gyp info spawn args '-I',gyp info spawn args 'E:web_hwfVue02appnode_',gyp info spawn args '-I',gyp info spawn args 'E:web_hwfVue02appnode_',gyp info spawn args '-I',gyp info spawn args 'C:',gyp info spawn args '-Dlibrary=shared_library',gyp info spawn args '-Dvisibility=default',gyp info spawn args '-Dnode_root_dir=C:-gyp10.1.0',gyp info spawn args '-Dnode_gyp_dir=E:web_hwfVue02appnode_modulesnode-gyp',gyp info spawn args '-Dnode_lib_file=C:-gyp10.1.0<(target_arch)',gyp info spawn args '-Dmodule_root_dir=E:web_hwfVue02appnode_modulesnode-sass',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:web_hwfVue02appnode_modulesnode-sassbuild',gyp info spawn args '-Goutput_dir=.' ]gyp verb command build []gyp verb build type Releasegyp verb architecture x64gyp verb node dev dir C:-gyp10.1.0gyp verb found first Solution file build/ verb could not find "" in PATH - finding location in registrygyp info spawn C: info spawn args [ 'build/',gyp info spawn args '/nologo',gyp info spawn args '/p:Configuration=Release;Platform=x64' ]Building the projects in this solution one at a time. To enable parallel build, please add the "/m" started 2018/6/6 15:52:t "E:web_hwfVue02appnode_" on node 1 (default targets).ValidateSolutionConfiguration: Building solution configuration "Release|x64".Project "E:web_hwfVue02appnode_" (1) is building "E:web_hwfVue02appnode_Project "E:web_hwfVue02appnode_oj" (2) is building "E:web_hwfVue02appnode_modulesnode-sassDone Building Project "E:web_hwfVue02appnode_j" (default targets) -- Building Project "E:web_hwfVue02appnode_oj" (default targets) -- Building Project "E:web_hwfVue02appnode_" (default targets) -- FAILED."E:web_hwfVue02appnode_" (default target) (1) ->"E:web_hwfVue02appnode_oj" (default target) (2) ->"E:web_hwfVue02appnode_j" (default target) (3) -> 0 Warning(s) 1 Error(s)Time Elapsed 00:00:00.07gyp ERR! build errorgyp ERR! stack Error: `C:` failed with exit code: 1gyp ERR! stack at (E:web_hwfVue02appnode_:258:23)gyp ERR! stack at (:182:13)gyp ERR! stack at rocess._ (internal/child_:235:12)gyp ERR! System Windows_NT 6.1.7601gyp ERR! cwd E:web_hwfVue02appnode_modulesnode-sassgyp ERR! node -v v10.1.0gyp ERR! node-gyp -v v3.6.2gyp ERR! not okBuild failed with error code: 1npm WARN eslint-config-standard@6.2.1 requires a peer of eslint-plugin-promise@>=3.3.0 but none is installed. You must install peer dependencies WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modulesfsevents):npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! node-sass@3.13.1 postinstall: `node scripts/`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@3.13.1 postinstall ERR! This is probably not a problem with npm. There is likely additional logging output ERR! A complete log of this run can be found in:npm ERR! C:UsersAdministratorAppDataRoamingnpm-cache_logs2018-06-06T07_52_55_:web_hwfVue02appnode_j(20,3): error MSB4019: The imported project "E:" was not f E:web_hwfVue02appnode_j(20,3): error MSB4019: The imported project "E:" was notgyp ERR! command "E:26_" "E:web_hwfVue02appnode_" "rebuild" "--verbose" "--libsass_ext=" "--libsnpm WARN rollback Rolling back source-map@0.4.4 failed (this is probably harmless): EPERM: operation not permitted, lstat 'E:web_hwfVue02appnode_modunpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","a解决办法:保存后 删除之前安装失败的包(第⼀次安装请跳过此步)npm uninstall
node-sass重新安装npm install
node-sass终于可以了终于可以了终于可以了中间安装过程中⼀些淘宝镜像 安装路径的这些简单问题就不说了
发布评论