Closed peterennis closed 5 years ago
Similar for the build:
` stencil build --prerender
[51:47.0] @stencil/core v0.11.0 🍇 [51:47.2] build, app, prod mode, started ... [51:47.4] transpile started ... [51:51.1] transpile finished in 3.72 s [51:51.1] module map started ... [51:51.2] generate styles started ... [51:52.0] compile global style start ... [51:52.5] compile global style finish in 566 ms [51:52.5] generate styles finished in 1.36 s [51:54.3] module map finished in 3.16 s [51:54.3] generate bundles started ... [51:59.4] generate bundles finished in 5.07 s [51:59.4] generate app files started ... [52:05.9] generate app files finished in 6.54 s [52:05.9] prerendering started ... [52:05.9] prerender, started: / ... [52:06.0] prerender, finished: / in 79 ms [52:06.0] prerendering failed in 88 ms
[ ERROR ] TypeError: Parameter "url" must be a string, not undefined at
Url.parse (url.js:103:11) at Object.urlParse [as parse]
(url.js:97:13) at getWritePathFromUrl
(/Users/Ralf/dev-tools/my-repos/stencil-app-starter/node_modules/@stencil/core/dist/compiler/index.js:7620:38)
at
/Users/Ralf/dev-tools/my-repos/stencil-app-starter/node_modules/@stencil/core/dist/compiler/index.js:13933:26
at Generator.next (
[ ERROR ] Cannot find module 'request' at Function.Module._resolveFilename
(module.js:538:15) at Function.Module._load (module.js:468:25) at
Module.require (module.js:587:17) at require
(internal/module.js:11:18) at
/Users/Ralf/dev-tools/my-repos/stencil-app-starter/node_modules/request-promise-native/lib/rp.js:8:12
at module.exports
(/Users/Ralf/dev-tools/my-repos/stencil-app-starter/node_modules/stealthy-require/lib/index.js:62:23)
at Object.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @stencil/starter@0.0.1 build: stencil build --prerender
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @stencil/starter@0.0.1 build 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! /Users/Ralf/.npm/_logs/2018-08-03T02_52_06_147Z-debug.log `
Would you be able to run the same commands with the --debug
flag? That may help pin point what the issue is. Thanks
Sure
stencil build --prerender --debug
[22:36.5] dev server www root: /Users/Ralf/dev-tools/my-repos/stencil-app-starter/www, base url: / MEM: 94.4MB [22:36.5] @stencil/core v0.11.0 🍇 [22:36.5] darwin, Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz, cpus: 4 MEM: 94.5MB [22:36.5] node v8.9.4 MEM: 94.5MB [22:36.5] compiler runtime: /Users/Ralf/dev-tools/my-repos/stencil-app-starter/node_modules/@stencil/core/dist/compiler/index.js MEM: 94.5MB [22:36.5] compiler build: 180631161929 MEM: 94.5MB [22:36.6] compiler workers: 4, tasks per worker: 2 MEM: 94.6MB [22:36.6] minifyJs: true, minifyCss: true, buildEs5: true MEM: 94.6MB [22:36.6] cache enabled, cacheDir: /Users/Ralf/dev-tools/my-repos/stencil-app-starter/.stencil MEM: 94.6MB [22:36.6] build, app, prod mode, started ... [22:36.6] [0] start build, 2018-07-03T04:22:36 MEM: 94.7MB [22:36.8] [0] empty dir: /Users/Ralf/dev-tools/my-repos/stencil-app-starter/www MEM: 82.4MB [22:36.8] [0] scan /Users/Ralf/dev-tools/my-repos/stencil-app-starter/src started ... [22:36.8] [0] scan for ts files finished in 17 ms [22:36.8] [0] buildTsService started ... [22:36.9] [0] buildTsService finished in 24 ms [22:36.9] transpile started ... [22:36.9] load collection: @stencil/router, node_modules/@stencil/router/dist/collection/collection-manifest.json MEM: 82.4MB [22:36.9] load collection: @stencil/state-tunnel, node_modules/@stencil/state-tunnel/dist/collection/collection-manifest.json MEM: 82.4MB [22:36.9] transpile finished in 45 ms [22:36.9] [0] generated src/components.d.ts MEM: 82.4MB [22:36.9] [0] validateTypes started ... [22:36.9] [0] generateEntryModules, 3 entryModules MEM: 82.4MB [22:36.9] [0] getComponentAssetsCopyTasks: 0 MEM: 82.4MB [22:36.9] module map started ... [22:36.9] [0] createBundle started ... [22:37.1] generate styles started ... [22:37.2] [0] getConfigCopyTasks: 2 MEM: 83.6MB [22:37.2] [0] copyTasks started ... [22:37.3] compile global style start ... [22:38.1] [0] global style: www/build/app.css MEM: 93.9MB [22:38.1] compile global style finish in 707 ms [22:38.1] generate styles finished in 982 ms [22:38.6] [0] createBundle finished in 1.63 s [22:39.3] [0] copyTasks finished in 2.08 s [22:40.8] module map finished in 3.84 s [22:40.8] generate bundles started ... [22:40.8] [0] generateBundleModes started ... [22:42.9] [0] generateBundleModes finished in 2.15 s [22:42.9] [0] genereateBrowserEsm started ... [22:42.9] [0] genereateBrowserEs5 started ... [22:42.9] [0] genereateBrowserEsm finished in 4 ms [22:44.1] [0] genereateBrowserEs5 finished in 1.20 s [22:44.1] generate bundles finished in 3.36 s [22:44.1] generate app files started ... [22:44.1] [0] generateCoreBrowser core.pf started, www/build/app ... [22:44.1] [0] generateCoreBrowser core started, www/build/app ... [22:46.6] [0] validateTypes finished in 9.70 s [22:47.7] [0] generateCoreBrowser core finished, www/build/app in 3.59 s [22:47.9] [0] generateCoreBrowser core.pf finished, www/build/app in 3.77 s [22:47.9] [0] generateLoader started, www/build/app.js ... [22:47.9] [0] writeAppRegistry: www/build/app/app.registry.json MEM: 115.9MB [22:48.3] [0] generateLoader finished, www/build/app.js in 347 ms [22:48.3] generate app files finished in 4.13 s [22:48.3] [0] optimizeHtml, write: www/index.html MEM: 115.9MB [22:48.3] [0] writeBuildFiles started ... [22:48.3] [0] in-memory-fs: data length: 80 MEM: 116.3MB [22:48.3] [0] cache: data length: 38 MEM: 116.3MB [22:48.3] [0] writeBuildFiles finished, files wrote: 15 in 14 ms [22:48.3] prerendering started ... [22:48.3] prerender, started: / ... [22:48.4] prerender, finished: / in 96 ms [22:48.4] prerendering failed in 108 ms [22:48.4] [0] aborted build, 2018-07-03T04:22:36 MEM: 118.8MB [22:48.4] [0] generateBuildResults started ... [22:48.4] [0] generateBuildResults finished in 3 ms
[ ERROR ] TypeError: Parameter "url" must be a string, not undefined at
Url.parse (url.js:103:11) at Object.urlParse [as parse]
(url.js:97:13) at getWritePathFromUrl
(/Users/Ralf/dev-tools/my-repos/stencil-app-starter/node_modules/@stencil/core/dist/compiler/index.js:7620:38)
at
/Users/Ralf/dev-tools/my-repos/stencil-app-starter/node_modules/@stencil/core/dist/compiler/index.js:13933:26
at Generator.next (
[ ERROR ] Cannot find module 'request' at Function.Module._resolveFilename
(module.js:538:15) at Function.Module._load (module.js:468:25) at
Module.require (module.js:587:17) at require
(internal/module.js:11:18) at
/Users/Ralf/dev-tools/my-repos/stencil-app-starter/node_modules/request-promise-native/lib/rp.js:8:12
at module.exports
(/Users/Ralf/dev-tools/my-repos/stencil-app-starter/node_modules/stealthy-require/lib/index.js:62:23)
at Object.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @stencil/starter@0.0.1 build: stencil build --prerender --debug
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @stencil/starter@0.0.1 build 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! /Users/Ralf/.npm/_logs/2018-08-03T04_22_48_514Z-debug.log
@peterennis I have the same problem. I solved it by running npm install request --save-dev
before npm start
.
@adamdbradley I was actually running into an issue after updating to 0.11.0 today with the build. Thats why I wanted to replicated it in this starter app.
The build process (stencil build --prerender) just doesnt finish at all. It stops with
prerender, started: / ...
I like that stencil.config.ts has now the advantages of TypeScript but it seems like that in the schema only "Dist" is allowed for outputTargets type value 🤔
Hope you can help us on this one.
@adamdbradley This issue: https://github.com/ionic-team/stencil/issues/985 At the end it shows what I had to change to get the app migrated from 0.10 to 0.11 This commit: https://github.com/peterennis/ae-svg-components/commit/7bcfa1887a821d186d1faeb1d3ebb041f23a056d This demo: https://aesvg.adaept.com/
I suspect some of these changes are not in the stencil-app-starter.
NOTE: fwiw my demo is only using stencil and components. No variables.scss
@ray-kay Can you try to delete .stencil folder first? Does this help?
@itsliang I just deleted the .stencil folder and run the build script again but I get the exact same error (see above). I am using npm 5.8.0 and node v8.9.4
FYI, I've submitted PR #59 which adds the request
npm package to the project. I created separate issue #58 for that PR specifically because this ticket lists additional issues that may or may not be related.
Thanks!
Installing the infamous request module doesn't help either. :(
Solved after install request
as devDependencies.
@rjoydip Ty that worked for me, just npm i request --saveDev
and it ran no problem
This should be fixed now. If someone could independently verify by doing the following it would be greatly appreciated:
@kensodemann - fatal: Could not read from remote repository. Windows 10 x64, git bash
peter@Merry-Christmas MINGW64 ~
$ pwd
/c/Users/peter
peter@Merry-Christmas MINGW64 ~
$ git clone git@github.com:ionic-team/stencil-app-starter.git
Cloning into 'stencil-app-starter'...
Warning: Permanently added the RSA host key for IP address '192.30.255.113' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
peter@Merry-Christmas MINGW64 ~
$
@kensodemann @adamdbradley
found 8 moderate severity vulnerabilities build worked
peter@Merry-Christmas MINGW64 ~
$ git clone https://github.com/ionic-team/stencil-starter.git my-app
Cloning into 'my-app'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 383 (delta 1), reused 4 (delta 1), pack-reused 374
Receiving objects: 100% (383/383), 391.50 KiB | 1.86 MiB/s, done.
Resolving deltas: 100% (197/197), done.
peter@Merry-Christmas MINGW64 ~
$ cd my-app
peter@Merry-Christmas MINGW64 ~/my-app (master)
$ git remote rm origin
peter@Merry-Christmas MINGW64 ~/my-app (master)
$ npm i
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 677 packages from 439 contributors and audited 20594 packages in 21.084s
found 8 moderate severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
peter@Merry-Christmas MINGW64 ~/my-app (master)
$ npm run build
> @stencil/starter@0.0.1 build C:\Users\peter\my-app
> stencil build --prerender
[32:00.3] @stencil/core v0.13.1
[32:00.3] build, app, prod mode, started ...
[32:00.4] transpile started ...
[32:02.4] transpile finished in 2.01 s
[32:02.6] module map started ...
[32:02.6] generate styles started ...
[32:03.1] compile global style start ...
[32:03.2] compile global style finish in 161 ms
[32:03.2] generate styles finished in 620 ms
[32:04.1] module map finished in 1.48 s
[32:04.1] module derive started ...
[32:10.2] module derive finished in 6.11 s
[32:10.2] generate bundles started ...
[32:10.2] generate bundles finished in 6 ms
[32:10.2] generate app files started ...
[32:13.1] generate app files finished in 2.87 s
[32:13.1] prerendering started ...
[32:13.1] prerender, started: / ...
[32:14.3] prerender, finished: / in 1.21 s
[32:14.4] prerender, started: /profile/stencil ...
[32:14.4] prerender, finished: /profile/stencil in 53 ms
[32:14.4] prerendered urls: 2 in 1.29 s
[32:14.4] Please wait while missing dependencies are installed. This may
take a few moments and will only be required for the first run.
[32:14.4] installing dependency: workbox-build ...
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ workbox-build@3.4.1
added 26 packages from 17 contributors in 9.355s
[32:25.2] installing dependencies finished in 10.77 s
[32:25.8] generate service worker started ...
[32:25.9] generate service worker finished in 101 ms
[32:25.9] build finished in 25.56 s
peter@Merry-Christmas MINGW64 ~/my-app (master)
Excellent! Thank-you for testing that out.
@adamdbradley
Stencil version: (run
npm list @stencil/core
from a terminal/cmd prompt and paste output below):I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior:
Expected behavior: It should work
Steps to reproduce:
Follow the readme instructions.![stencil-spins](https://user-images.githubusercontent.com/140737/43549191-db77bad8-9594-11e8-987f-802134510f0a.gif)
Other information: Related: https://github.com/ionic-team/create-stencil/issues/8