Errors with V4 Custom Build

Hi there,

I’m having issues with creating a custom F7 build with the latest version. I’m cloning from github, running npm install, then attempting npm run build-core:prod which fails.

It’s also failing when I create my own config file and npm run build-core:prod – --config path/to/config.js --output path/to/output/folder

I’m on Windows 10, Node 8.11.1, npm 5.6.0

Am I doing something wrong? Details below:

PS C:\Users\phils\Desktop\framework7> npm install

[email protected] install C:\Users\phils\Desktop\framework7\node_modules\husky
node husky install

husky > setting up git hooks
husky > done

[email protected] postinstall C:\Users\phils\Desktop\framework7
node -e “console.log(’\u001b[35m\u001b[1mLove Framework7? Support project by donating or pledging on patreon:\u001b[22m\u001b[39m\n > \u001b[32mhttps://patreon.com/vladimirkharlampidi\u001b[0m\n’)”

Love Framework7? Support project by donating or pledging on patreon:

https://patreon.com/vladimirkharlampidi

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

added 818 packages in 46.077s
PS C:\Users\phils\Desktop\framework7> npm run build-core:prod

[email protected] build-core:prod C:\Users\phils\Desktop\framework7
cross-env NODE_ENV=production gulp build-core

[12:47:24] Using gulpfile ~\Desktop\framework7\gulpfile.js
[12:47:24] Starting ‘build-core’…
[12:47:24] Starting ‘core-js’…
TypeError: this.error is not a function
[12:47:24] Finished ‘core-js’ after 25 ms
[12:47:24] Starting ‘core-components’…
TypeError: this.error is not a function
[12:47:29] Finished ‘core-components’ after 4.75 s
[12:47:29] Starting ‘core-typings’…
[12:47:29] Finished ‘core-typings’ after 32 ms
[12:47:29] Starting ‘core-styles’…
[12:47:33] Finished ‘core-styles’ after 4.56 s
[12:47:33] Starting ‘core-lazy-components’…
TypeError: this.error is not a function
[12:47:36] The following tasks did not complete: build-core, core-lazy-components
[12:47:36] Did you forget to signal async completion?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-core:prod: cross-env NODE_ENV=production gulp build-core
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-core:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\phils\AppData\Roaming\npm-cache_logs\2019-05-23T10_47_36_069Z-debug.log
PS C:\Users\phils\Desktop\framework7>

2019-05-23T10_47_36_069Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’,
1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘run’,
1 verbose cli ‘build-core:prod’ ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ ‘prebuild-core:prod’,
4 verbose run-script ‘build-core:prod’,
4 verbose run-script ‘postbuild-core:prod’ ]
5 info lifecycle [email protected]~prebuild-core:prod: [email protected]
6 info lifecycle [email protected]~build-core:prod: [email protected]
7 verbose lifecycle [email protected]~build-core:prod: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build-core:prod: PATH: C:\Users\phils\AppData\Roaming\nvm\v8.11.1\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\phils\Desktop\framework7\node_modules.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Git\cmd;C:\HashiCorp\Vagrant\bin;C:\php-7.2.5;C:\ProgramData\ComposerSetup\bin;C:\Users\phils\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\WINDOWS\System32\OpenSSH;C:\Program Files\PuTTY;C:\Ruby22\bin;C:\Users\phils\AppData\Local\Microsoft\WindowsApps;C:\Users\phils\AppData\Roaming\Composer\vendor\bin;C:\Users\phils\AppData\Local\Programs\Microsoft VS Code\bin
9 verbose lifecycle [email protected]~build-core:prod: CWD: C:\Users\phils\Desktop\framework7
10 silly lifecycle [email protected]~build-core:prod: Args: [ ‘/d /s /c’, ‘cross-env NODE_ENV=production gulp build-core’ ]
11 silly lifecycle [email protected]~build-core:prod: Returned: code: 1 signal: null
12 info lifecycle [email protected]~build-core:prod: Failed to exec build-core:prod script
13 verbose stack Error: [email protected] build-core:prod: cross-env NODE_ENV=production gulp build-core
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Users\phils\AppData\Roaming\nvm\v8.11.1\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (C:\Users\phils\AppData\Roaming\nvm\v8.11.1\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\phils\Desktop\framework7
16 verbose Windows_NT 10.0.17134
17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “build-core:prod”
18 verbose node v8.11.1
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build-core:prod: cross-env NODE_ENV=production gulp build-core
22 error Exit status 1
23 error Failed at the [email protected] build-core:prod script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I would assume something wrong with local node.js. Can you try to update it to 10+ version and check again?

Same issue with node 10.15.3 and npm 6.4.1

PS C:\Users\phils\Desktop> node -v
v10.15.3
PS C:\Users\phils\Desktop> npm -v
6.4.1
PS C:\Users\phils\Desktop> cd .\framework7
PS C:\Users\phils\Desktop\framework7> npm install

[email protected] postinstall C:\Users\phils\Desktop\framework7
node -e “console.log(’\u001b[35m\u001b[1mLove Framework7? Support project by donating or pledging on patreon:\u001b[22m\u001b[39m\n > \u001b[32mhttps://patreon.com/vladimirkharlampidi\u001b[0m\n’)”

Love Framework7? Support project by donating or pledging on patreon:

https://patreon.com/vladimirkharlampidi

npm WARN [email protected] requires a peer of [email protected]>=1.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

audited 14349 packages in 5.725s
found 0 vulnerabilities

PS C:\Users\phils\Desktop\framework7> npm run build-core:prod

[email protected] build-core:prod C:\Users\phils\Desktop\framework7
cross-env NODE_ENV=production gulp build-core

[13:46:35] Using gulpfile ~\Desktop\framework7\gulpfile.js
[13:46:35] Starting ‘build-core’…
[13:46:35] Starting ‘core-js’…
TypeError: this.error is not a function
[13:46:35] Finished ‘core-js’ after 11 ms
[13:46:35] Starting ‘core-components’…
TypeError: this.error is not a function
[13:46:36] Finished ‘core-components’ after 788 ms
[13:46:36] Starting ‘core-typings’…
[13:46:36] Finished ‘core-typings’ after 9.58 ms
[13:46:36] Starting ‘core-styles’…
[13:46:40] Finished ‘core-styles’ after 4.38 s
[13:46:40] Starting ‘core-lazy-components’…
TypeError: this.error is not a function
[13:46:42] The following tasks did not complete: build-core, core-lazy-components
[13:46:42] Did you forget to signal async completion?
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-core:prod: cross-env NODE_ENV=production gulp build-core
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-core:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\phils\AppData\Roaming\npm-cache_logs\2019-05-23T11_46_42_902Z-debug.log
PS C:\Users\phils\Desktop\framework7>

I did a completely fresh install of Node. Installed rollup v 1.11.0 as that came up as a warning. It looks like it’s failing in the rollup call in build-core-lazy-components.js

Any other advice?

Cheers

Ok, just tried, and for some reason also have this issue. I have updated all dependencies, and now it works.

Just clone again latest version of repo (or git pull) and

npm i
npm run build-core:prod
1 Like

That’s looking better! :smiley: All working smoothly now.

Thanks for responding so quickly. You are a machine!