Issues using Typescript and Webpack
See original GitHub issueHi,
I’m trying to use this lib in a typescript + webpack project. I’ve installed the module:
npm install azure-storage --save
When running webpack build I get errors in a lot of files from the library, there are two types of errors: For .json files:
ERROR in ./~/azure-storage/~/har-validator/lib/schemas/pageTimings.json
Module parse failed: C:\projects\foo\node_modules\azure-storage\node_modules\har-validator\lib\schemas\pageTimings.json Unexpected token
You may need an appropriate loader to handle this file type.
| {
| "type": "object",
| "properties": {
| "onContentLoad": {
@ ./~/azure-storage/~/har-validator/lib/schemas/index.js 13:15-44
@ ./~/azure-storage/~/har-validator/lib/index.js
@ ./~/azure-storage/~/request/lib/har.js
@ ./~/azure-storage/~/request/request.js
@ ./~/azure-storage/~/request/index.js
@ ./~/azure-storage/lib/common/services/storageserviceclient.js
@ ./~/azure-storage/lib/common/common.js
@ ./~/azure-storage/lib/azure-storage.js
@ ./~/azure-storage-simple/dist/index.js
@ ./src ^\.\/.*$
@ ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js
@ multi aurelia
For .js files:
ERROR in ./~/azure-storage/~/form-data/lib/form_data.js
Module not found: Error: Can't resolve 'fs' in 'C:\projects\foo\node_modules\azure-storage\node_modules\form-data\lib'
@ ./~/azure-storage/~/form-data/lib/form_data.js 7:9-22
@ ./~/azure-storage/~/request/request.js
@ ./~/azure-storage/~/request/index.js
@ ./~/azure-storage/lib/common/services/storageserviceclient.js
@ ./~/azure-storage/lib/common/common.js
@ ./~/azure-storage/lib/azure-storage.js
@ ./~/azure-storage-simple/dist/index.js
@ ./src ^\.\/.*$
@ ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js
@ multi aurelia
A third error for .js files is like this:
ERROR in ./~/forever-agent/index.js
Module not found: Error: Can't resolve 'tls' in 'C:\projects\foo\node_modules\forever-agent'
@ ./~/forever-agent/index.js 7:10-24
@ ./~/azure-storage/~/request/request.js
@ ./~/azure-storage/~/request/index.js
@ ./~/azure-storage/lib/common/services/storageserviceclient.js
@ ./~/azure-storage/lib/common/common.js
@ ./~/azure-storage/lib/azure-storage.js
@ ./~/azure-storage-simple/dist/index.js
@ ./src ^\.\/.*$
@ ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js
@ multi aurelia
I’m using aurelia but I don’t think it is related to the aurelia loader. Any help is appreciated.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Using webpack with TypeScript - LogRocket Blog
Learn how to use webpack to compile TypeScript to JavaScript and bundle source code into a single JavaScript file.
Read more >TypeScript - webpack
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. In this guide we will learn how to integrate TypeScript with...
Read more >Integrating TypeScript with Webpack - Medium
In this lesson, we are going to learn how to compile a TypeScript project using Webpack. This setup becomes necessary if you want...
Read more >Inconsistency with TypeScript in Module Resolution with Fully ...
Bug report What is the current behavior? When using extention .js as part of an import (fully-specified ESM import), webpack fails to create ......
Read more >Using Webpack with TypeScript
Webpack is a popular tool that we can use to bundle all our JavaScript code into a single minified file. It is capable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mikeesouth , the webpack works fine from my side. If you meet the error -
module not found: Error: Cannot resolve module 'browserify-fs'
, runnpm install browserify-fs
.Here is my result and configuration for your reference: Result:
Feel free to let us know if further assistance required.