Closed kristianmandrup closed 8 years ago
I have a similar issue also, but with WebPack.
Running locally is fine, but building for deployment throws an error in WebPack
I have similar issue but with skeleton-typescript-webpack both locally and deployment. @am2software how did you set it up so you don't get that error on npm start
?
I had a similar issue for sortablejs which I solved like this.
import sortable = require('sortablejs');
So try:
import validate = require('validate');
Found hint here: http://stackoverflow.com/questions/35277354/module-resolves-to-a-non-entity-module-and-cannot-be-imported-using-this-c
@kristianmandrup that has resolved my issue
in aurelia.validatejs.d.ts change
import validate from 'validate.js';
into
import validate = require('validate.js');
Cute ;) I had to do a similar fix for sortable.js, renaming the export variable in the d.ts file
Could this fix be included in next version of aurelia.validatejs.d.ts?
I'm submitting a bug report
Please tell us about your environment:
Current behavior:
Visual Studio code also complains with a red underline under
validate
constant inimport validate from 'validate.js';
Expected/desired behavior:
That it can load
aurelia-validatejs
type definitions without error