Giter VIP home page Giter VIP logo

Comments (15)

grapewheel avatar grapewheel commented on July 28, 2024

@ftlh2005
请问你是全局安装了 webpack 吗?有安装其他vue组件吗?就是之前已经npm i webpack -g

我这边调试IOS和安卓都可以的,出现这种情况很有可能是所用的webpack版本过低打包导致的(webpack没有将部分ES6代码转义为ES5导致

你可以在 package.json 中修改 scripts,如下试试,而且需要检查下nodejs的版本是不是10.13以上:

{
  "scripts": {
    ....
    "wifi-sync": "npx webpack --config webpack.prod.js && apicloud wifiSync --project ./ --updateAll false --port 23456",
    ....
    "build": "npx webpack --config webpack.prod.js"
  },
}

npx 是直接调用本项目下安装的模块命令

from avvw.

grapewheel avatar grapewheel commented on July 28, 2024

@ftlh2005
同时请贴出你所测试的机型、系统版本等以便排查,谢谢!

from avvw.

ftlh2005 avatar ftlh2005 commented on July 28, 2024

npm -v
6.7.0
node -v
v10.15.1
webpack -v
4.29.0

OPPO R9m Android 5.1

自定义基座

`liaopingdeiMac:app liaoping$ git clone https://github.com/grapewheel/avvw.git
Cloning into 'avvw'...
remote: Enumerating objects: 64, done.
remote: Counting objects: 100% (64/64), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 64 (delta 20), reused 55 (delta 14), pack-reused 0
Unpacking objects: 100% (64/64), done.
liaopingdeiMac:app liaoping$ cd avvw
liaopingdeiMac:avvw liaoping$ npm i

[email protected] install /Volumes/myData/app/avvw/node_modules/fsevents
node install

node-pre-gyp WARN Using needle for node-pre-gyp https download
[fsevents] Success: "/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" is installed via remote

[email protected] postinstall /Volumes/myData/app/avvw/node_modules/webpack-cli
lightercollective

 *** Thank you for using webpack-cli! ***

Please consider donating to our open collective
to help us maintain this package.

https://opencollective.com/webpack/donate

                ***

added 780 packages from 385 contributors and audited 9546 packages in 16.034s
found 0 vulnerabilities

liaopingdeiMac:avvw liaoping$ npm run wifi-sync

[email protected] wifi-sync /Volumes/myData/app/avvw
webpack --config webpack.prod.js && apicloud wifiSync --project ./ --updateAll false --port 23456

clean-webpack-plugin: /Volumes/myData/app/avvw/dist has been removed.
Hash: d3a39c4683986cc4596d
Version: webpack 4.29.0
Time: 3205ms
Built at: 2019-01-31 14:41:26
Asset Size Chunks Chunk Names
fastclick.min.js 16.2 KiB [emitted]
home.html 1.47 KiB [emitted]
home.js 18.2 KiB 1 [emitted] home
index.html 636 bytes [emitted]
tab1.html 1.47 KiB [emitted]
tab1.js 14.4 KiB 2 [emitted] tab1
tab2.html 1.47 KiB [emitted]
tab2.js 2.73 KiB 3 [emitted] tab2
tab3.html 1.47 KiB [emitted]
tab3.js 14.8 KiB 4 [emitted] tab3
vendorshometab1tab2tab3.js 97.7 KiB 0 [emitted] vendorshometab1tab2tab3
vue.min.js 85.5 KiB [emitted]
Entrypoint home = vendorshometab1tab2tab3.js home.js
Entrypoint tab1 = vendorshometab1tab2tab3.js tab1.js
Entrypoint tab2 = vendorshometab1tab2tab3.js tab2.js
Entrypoint tab3 = vendorshometab1tab2tab3.js tab3.js
[0] ./node_modules/vant/es/utils/index.js + 2 modules 1.59 KiB {0} [built]
| 3 modules
[2] ./node_modules/vant/es/icon/index.js + 1 modules 1.05 KiB {0} [built]
| 2 modules
[10] ./node_modules/vant/es/utils/create.js + 2 modules 1.79 KiB {1} {2} {4} [built]
| 3 modules
[16] ./node_modules/vant/es/locale/index.js + 2 modules 2.89 KiB {0} [built]
| 3 modules
[18] ./node_modules/style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/home.vue?vue&type=style&index=0&id=56b687e3&scoped=true&lang=css& 1.59 KiB {1} [built]
[19] ./node_modules/style-loader!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/tab2.vue?vue&type=style&index=0&id=3b196741&scoped=true&lang=css& 1.59 KiB {3} [built]
[23] (webpack)/buildin/global.js 472 bytes {0} [built]
[36] ./src/pages/home.vue?vue&type=style&index=0&id=56b687e3&scoped=true&lang=css& 608 bytes {1} [built]
[37] ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/home.vue?vue&type=style&index=0&id=56b687e3&scoped=true&lang=css& 195 bytes {1} [built]
[44] ./src/pages/tab2.vue?vue&type=style&index=0&id=3b196741&scoped=true&lang=css& 608 bytes {3} [built]
[45] ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/tab2.vue?vue&type=style&index=0&id=3b196741&scoped=true&lang=css& 211 bytes {3} [built]
[50] ./src/pages/home.vue + 16 modules 25.9 KiB {1} [built]
| ./src/pages/home.vue 1.15 KiB [built]
| ./src/pages/home.vue?vue&type=template&id=56b687e3&scoped=true& 214 bytes [built]
| ./src/pages/home.vue?vue&type=script&lang=js& 346 bytes [built]
| ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/home.vue?vue&type=template&id=56b687e3&scoped=true& 1020 bytes [built]
| ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/home.vue?vue&type=script&lang=js& 1.91 KiB [built]
| ./src/libs/apicloud.js 14.4 KiB [built]
| + 11 hidden modules
[51] ./src/pages/tab3.vue + 16 modules 18.3 KiB {4} [built]
| ./src/pages/tab3.vue 1.06 KiB [built]
| ./src/pages/tab3.vue?vue&type=template&id=3b277ec2&scoped=true& 214 bytes [built]
| ./src/pages/tab3.vue?vue&type=script&lang=js& 346 bytes [built]
| ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/tab3.vue?vue&type=template&id=3b277ec2&scoped=true& 424 bytes [built]
| ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/tab3.vue?vue&type=script&lang=js& 896 bytes [built]
| ./src/libs/api.js 531 bytes [built]
| ./src/libs/utils.js 417 bytes [built]
| + 10 hidden modules
[52] ./src/pages/tab1.vue + 9 modules 13.8 KiB {2} [built]
| ./src/pages/tab1.vue 1.06 KiB [built]
| ./src/pages/tab1.vue?vue&type=template&id=3b0b4fc0&scoped=true& 214 bytes [built]
| ./src/pages/tab1.vue?vue&type=script&lang=js& 346 bytes [built]
| ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/tab1.vue?vue&type=template&id=3b0b4fc0&scoped=true& 810 bytes [built]
| ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/tab1.vue?vue&type=script&lang=js& 749 bytes [built]
| + 5 hidden modules
[53] ./src/pages/tab2.vue + 6 modules 3.53 KiB {3} [built]
| ./src/pages/tab2.vue 1.15 KiB [built]
| ./src/pages/tab2.vue?vue&type=template&id=3b196741&scoped=true& 214 bytes [built]
| ./src/pages/tab2.vue?vue&type=script&lang=js& 346 bytes [built]
| ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/tab2.vue?vue&type=template&id=3b196741&scoped=true& 830 bytes [built]
| ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/pages/tab2.vue?vue&type=script&lang=js& 961 bytes [built]
| + 2 hidden modules
+ 39 hidden modules
Child html-webpack-plugin for "home.html":
1 asset
Entrypoint undefined = home.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/templates/page.ejs 1.69 KiB {0} [built]
[2] (webpack)/buildin/global.js 472 bytes {0} [built]
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
+ 1 hidden module
Child html-webpack-plugin for "tab1.html":
1 asset
Entrypoint undefined = tab1.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/templates/page.ejs 1.69 KiB {0} [built]
[2] (webpack)/buildin/global.js 472 bytes {0} [built]
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
+ 1 hidden module
Child html-webpack-plugin for "tab2.html":
1 asset
Entrypoint undefined = tab2.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/templates/page.ejs 1.69 KiB {0} [built]
[2] (webpack)/buildin/global.js 472 bytes {0} [built]
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
+ 1 hidden module
Child html-webpack-plugin for "tab3.html":
1 asset
Entrypoint undefined = tab3.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/templates/page.ejs 1.69 KiB {0} [built]
[2] (webpack)/buildin/global.js 472 bytes {0} [built]
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
+ 1 hidden module
liaopingdeiMac:avvw liaoping$ npm -v
6.7.0
liaopingdeiMac:avvw liaoping$ node -v
v10.15.1
liaopingdeiMac:avvw liaoping$ webpack -v
4.29.0
liaopingdeiMac:avvw liaoping$
`

from avvw.

ftlh2005 avatar ftlh2005 commented on July 28, 2024

@grapewheel 按你说的修改package后还是一样的问题!

from avvw.

grapewheel avatar grapewheel commented on July 28, 2024

@ftlh2005 或者你试下将pages目录下的home.vue中以下代码修改试下:

this.$ac.openFrameGroup(
		{
			name: "homeTabs",
			scrollEnabled: true,
			rect: {
				x: 0,
				y: navHeight,
				w: "auto",
				h: frameHeight
			},
			index: 0,
			useWKWebView: false, // **修改此处!禁止使用WKWebView渲染!手机全兼容**
			historyGestureEnabled: false,
                        ...

如果还是不行,那你就修改home.vue全部代码为以下简单的显示Hello world看看行不行,排查下到底是手机web引擎不兼容还是webpack打包问题:

<template>
   <div>Hello world</div>
</template>

from avvw.

ftlh2005 avatar ftlh2005 commented on July 28, 2024

@grapewheel 禁止使用WKWebView渲染, 手机调试同样白屏,

from avvw.

grapewheel avatar grapewheel commented on July 28, 2024

@ftlh2005 有没有试试这个?其他人都正常,有点奇怪
如果还是不行,那你就修改home.vue全部代码为以下简单的显示Hello world看看行不行,排查下到底是手机web引擎不兼容还是webpack打包问题:

<template>
   <div>Hello world</div>
</template>

from avvw.

ftlh2005 avatar ftlh2005 commented on July 28, 2024

@grapewheel
使用 npm install 安装, 卡在这里
npm install
⸨ ░░░░░░⸩ ⠴ extract:uglify-js: sill extract [email protected] extracted to /Volumes/myData/app/avvw/node_modules/.staging/uglify-js-370cc180 (5648ms)

from avvw.

ftlh2005 avatar ftlh2005 commented on July 28, 2024

sudo npm install
Password:

[email protected] install /Volumes/myData/app/avvw/node_modules/fsevents
node install

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Volumes/myData/app/avvw/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Volumes/myData/app/avvw/node_modules/fsevents/build'
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Volumes/myData/app/avvw/node_modules/fsevents
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Volumes/myData/app/avvw/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Volumes/myData/app/avvw/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Volumes/myData/app/avvw/node_modules/fsevents
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)

[email protected] postinstall /Volumes/myData/app/avvw/node_modules/webpack-cli
lightercollective

 *** Thank you for using webpack-cli! ***

Please consider donating to our open collective
to help us maintain this package.

https://opencollective.com/webpack/donate

                ***

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 712 packages from 368 contributors and audited 9546 packages in 19.537s
found 0 vulnerabilities

from avvw.

grapewheel avatar grapewheel commented on July 28, 2024

@ftlh2005 你是用什么操作系统的?为何提示安装的卷轴没有权限?

node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Volumes/myData/app/avvw/node_modules/fsevents/lib'

你先检查下你安装的目录是否没有给node-pre-gyp读写权限等,然后再试试改用cnpm来重新安装依赖,记得重新安装依赖前删除node_modules文件夹

from avvw.

grapewheel avatar grapewheel commented on July 28, 2024

@ftlh2005 by the way
fsevents 依赖模块只能在window下才能安装,linux下是不能安装的,但不会提示无权限安装,只是warn下没有安装而已,也不会带来影响

from avvw.

ftlh2005 avatar ftlh2005 commented on July 28, 2024

@grapewheel mac 10.14.3 (18D42)

node_modules 目录删除后,重新安装

liaopingdeiMac:avvw liaoping$ npm config set registry https://registry.npm.taobao.org
liaopingdeiMac:avvw liaoping$ npm config get registry
https://registry.npm.taobao.org/
liaopingdeiMac:avvw liaoping$ sudo npm install

[email protected] install /Volumes/myData/app/avvw/node_modules/fsevents
node install

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Volumes/myData/app/avvw/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Volumes/myData/app/avvw/node_modules/fsevents/build'
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Volumes/myData/app/avvw/node_modules/fsevents
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Volumes/myData/app/avvw/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Volumes/myData/app/avvw/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Volumes/myData/app/avvw/node_modules/fsevents
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Volumes/myData/app/avvw/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)

[email protected] postinstall /Volumes/myData/app/avvw/node_modules/webpack-cli
lightercollective

 *** Thank you for using webpack-cli! ***

Please consider donating to our open collective
to help us maintain this package.

https://opencollective.com/webpack/donate

                ***

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 712 packages from 368 contributors and audited 9553 packages in 12.751s
found 0 vulnerabilities

from avvw.

ftlh2005 avatar ftlh2005 commented on July 28, 2024

@grapewheel 方便加Q TeamViewer 远程看看不?

from avvw.

grapewheel avatar grapewheel commented on July 28, 2024

@ftlh2005 可以
124711483

from avvw.

grapewheel avatar grapewheel commented on July 28, 2024

已适配安卓6以下低端机型, branch fix-android5,已合并到master

from avvw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.