Registry / storage / azure-storage-legacy

azure-storage-legacy

JSON →
library0.11.2jsnpmunverified

This package is the legacy Microsoft Azure Storage client library for Node.js, targeting the 2013-03-01 API version. It provides back compatibility for older versions of the Azure SDK for Node.js, offering blob, table, and queue storage services. The current stable version is 0.11.2, but it is no longer actively developed; users should migrate to @azure/storage-blob, @azure/storage-queue, and @azure/data-tables. This legacy library uses callback-based APIs and does not support modern async/await patterns or the latest Azure Storage features.

npm install azure-storage-legacy
INSTALL
IMPORT
SIG · AZURE-STORAGE-LEGA
A
azure-storage-legacy
storagejavascriptv0.11.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createBlobService
var storage = require('azure-storage-legacy'); var blobService = storage.createBlobService();
import { createBlobService } from 'azure-storage-legacy';
This package does not support ESM imports; use CommonJS require()
createTableService
var storage = require('azure-storage-legacy'); var tableService = storage.createTableService();
import { createTableService } from 'azure-storage-legacy';
ESM imports will fail; always use require()
createQueueService
var storage = require('azure-storage-legacy'); var queueService = storage.createQueueService();
import { createQueueService } from 'azure-storage-legacy';
ESM not supported; use require()

Shows connection to Azure Storage and creation of a blob container using the legacy callback-based API.

var storage = require('azure-storage-legacy'); var blobService = storage.createBlobService(process.env.AZURE_STORAGE_ACCOUNT ?? '', process.env.AZURE_STORAGE_ACCESS_KEY ?? ''); blobService.createContainerIfNotExists('mycontainer', { publicAccessLevel: 'blob' }, function(err) { if (!err) { console.log('Container created'); } else { console.error('Error creating container', err); } });
Debug
Known issues
deprecatedThis package is deprecated in favor of @azure/storage-blob, @azure/storage-queue, and @azure/data-tables
fix
Migrate to the new Azure SDK packages (e.g., @azure/storage-blob) for async/await support and latest features.
affects: >=0.0.0
breakingAPI version 2013-03-01 is outdated; some features may not work with modern Azure Storage accounts
fix
Upgrade to the new Azure SDK packages that support newer API versions.
affects: >=0.0.0
gotchaThe package does not support ESM imports; attempting to use import will fail
fix
Use CommonJS require() instead of ES6 import statements.
affects: >=0.0.0
gotchaCallbacks only; no Promise or async/await support
fix
Wrap calls in Promise or use a callback-to-promise utility, or migrate to the new SDK.
affects: >=0.0.0
deprecatedThe table service does not support Azure Cosmos DB Table API
fix
Use @azure/data-tables for Cosmos DB compatibility.
affects: >=0.0.0
Errors
Common errors & fixes
Error: listen EADDRINUSE :::3000
Another service is already running on port 3000
fix
Change the port number or stop the other service.
TypeError: Cannot read property 'createBlobService' of undefined
Incorrect import or require path; package name may be wrong
fix
Ensure you installed 'azure-storage-legacy' and use require('azure-storage-legacy').
StorageError: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
Invalid storage account name or access key
fix
Check AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables.
ReferenceError: storage is not defined
Forgot to require the package
fix
Add 'var storage = require('azure-storage-legacy');' at the top.
Upgrade
Version history
0.11.2latest on npm
Audit
Dependencies
azure-storageoptionalThis package is an alias; many users mistakenly install the wrong one
Agent activity
48 hits · last 30 days
node
42
Resources
azure-storage-legacy — npm install azure-storage-legacy · libregistry