Comments (14)
Temporarily fix via cordova hook when using unfixed version 7.0.0:
config.xml:
<platform name="windows">
<hook type="before_prepare" src="hooks/win_winjs_fix.js" />
</platform>
hooks/win_winjs_fix.js:
const path = require('path');
const shell = require('shelljs');
const fs = require('fs');
module.exports = function (ctx)
{
if (!ctx.opts.platforms.includes('windows'))
return;
return new Promise(function (resolve, reject)
{
const root = ctx.opts.projectRoot;
const projectPath = path.join(root, 'platforms', 'windows');
const destinationDirectory = path.join(projectPath, 'platform_www', 'WinJS', 'js');
const destBaseJsPath = path.join(destinationDirectory, 'base.js');
//var srcBaseJsPath = path.join(root, 'node_modules', 'winjs', 'js', 'base.js');
const srcBaseJsPath = require.resolve('winjs/js/base');
fs.mkdirSync(destinationDirectory, { recursive: true });
shell.cp('-f', srcBaseJsPath, destBaseJsPath);
resolve();
});
};
from cordova-windows.
@pjc2007 , [email protected] is working. You can downgrade the cordova-windows by running the commands:
cordova platform rm windows
cordova platform add [email protected]
from cordova-windows.
@janpio I think we still need to make this release. I recall it was discussed on the mailing list but was stalled for some reason (we were waiting for a response on something). Any way we can unblock the release?
from cordova-windows.
Feel free to take over and figure things out. I can and will not spend time on this right now or the near future.
from cordova-windows.
This should be fixed in [email protected] patch release. Please report if this issue continues to persist in 7.0.1 or any later releases.
from cordova-windows.
This has already been fixed with #331, but not released yet: 7.0.0...master
from cordova-windows.
Temporarily fix via cordova hook when using unfixed version 7.0.0:
config.xml:
<platform name="windows"> <hook type="before_prepare" src="hooks/win_winjs_fix.js" /> </platform>
hooks/win_winjs_fix.js:
const path = require('path'); const shell = require('shelljs'); const fs = require('fs'); module.exports = function (ctx) { if (!ctx.opts.platforms.includes('windows')) return; return new Promise(function (resolve, reject) { const root = ctx.opts.projectRoot; const projectPath = path.join(root, 'platforms', 'windows'); const destinationDirectory = path.join(projectPath, 'platform_www', 'WinJS', 'js'); const destBaseJsPath = path.join(destinationDirectory, 'base.js'); //var srcBaseJsPath = path.join(root, 'node_modules', 'winjs', 'js', 'base.js'); const srcBaseJsPath = require.resolve('winjs/js/base'); fs.mkdirSync(destinationDirectory, { recursive: true }); shell.cp('-f', srcBaseJsPath, destBaseJsPath); resolve(); }); };
I suggest you put the mkdir in a try catch otherwise it will be blocking the compile most of the time.
try { fs.mkdirSync(destinationDirectory, { recursive: true }); } catch (err) { if (err.code !== 'EEXIST') throw err; }
from cordova-windows.
I tried adding the above hook in config.xml, and the win_winjs_fix.js
from @Jahrenski, I removed and readded windows to my Ionic/Cordova project, but I still get the error when adding Windows. I don't have the node_modules\cordova-windows\node_modules\winjs
folder.
from cordova-windows.
@pjc2007 any updates with this? Currently facing the same problem while waiting for the official release.
from cordova-windows.
@darylldawn - no unfortunately. At the moment I cannot build the Windows version of my app at all. e.g. I get this error.. Not sure if it related to this one. Soon, the need to going to become more urgent for me.
from cordova-windows.
@feiandytan - thankyou! I tried what you suggested and I not longer get the error. I do still get my build errors with my Ionic Windows SQLite project ie
fatal error C1083: Cannot open include file: 'winapifamily.h': No such file or directory [D:\dev\myapp\plugins\cordova-sqlite-storage\src\windows\SQLite3-WinRT-sync\SQLite3\SQLite3.UWP.vcxproj]
but I now know that is not related to this issue
from cordova-windows.
@pjc2007 Hey, I was able to build just a while ago with @regnete's solution. I didn't have the same exact error as you, but I was initially having problems with SQLite3. After installing all the dependencies
(Platform Toolset, Windows 10 SDK, etc) via Visual Studio Installer, setting an environment variable (sqlite related) and finally hooking the temporary fix above, I was able to run.
Since it might be related to one of the plugins you are currently using (I have a hunch it might be the sqlite plugin -- I also did the remove and add one by one plugin procedure), you can also check out issues at their respective repositories (but of course I think you might already have).
Looking forward to the 7.1.0 release!
from cordova-windows.
@darylldawn - ok thanks, Yes I will need to do all that. I think my Visual Studio and related tools may be messed up after a few uninstalls and updates of them. Perhaps Visual Studio 2019 install mucked it up.
from cordova-windows.
Thanks @janpio, I will take it over when I get a chance.
from cordova-windows.
Related Issues (20)
- JavaScript UWP development from VS 2019 not supported HOT 1
- JavaScript UWP development from Visual Studio 2019 not supported HOT 1
- Can't cordova build or run platform windows with Visual Studio 2017 HOT 3
- use @cordova/eslint-config HOT 1
- META: start major release 8.0.0 with some breaking changes HOT 1
- Can we use target minimum windows SDK version 10.0.16299.0 HOT 1
- Error: WebGL not supported HOT 2
- Windows: uap capability included when building for 8.1 HOT 1
- Using Chrome-based webview as rendering backend for Cordova for Windows instead of EdgeHTML HOT 2
- comma as decimal separator on ```<input type="number"> ``` HOT 1
- window.alert , prompt, confirm not working, please help me it is an emergency. Please please help me urgently.ππ»ππ»ππ»ππ» HOT 1
- The following navigation rule had an invalid URI scheme and will be ignored: "*". HOT 1
- Microsoft Surface hybrid touch events HOT 1
- Absolute (root relative) paths do not resolve to www folder, instead point to C:\... HOT 3
- Cordova installation problem HOT 2
- Running HelloWorld throws an error HOT 2
- package.windows10.appxmanifest does not set the correct descriptions as in config.xml HOT 1
- instructions from https://cordova.apache.org for platform Windows erroneous HOT 1
- The processor architecture of your project 'arm' doesnβt match the processor architecture 'x86' of the referenced project 'SQLite3.UWP'. HOT 1
- shelljs 0.5.3 is vulnerable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-windows.