GithubHelp home page GithubHelp logo

issue on linux about azure-sdk-for-node HOT 25 CLOSED

azure avatar azure commented on May 30, 2024
issue on linux

from azure-sdk-for-node.

Comments (25)

glennblock avatar glennblock commented on May 30, 2024

What version of node? Can you send the npm logs?

Sent from my Windows Phone
From: John Davis
Sent: 12/31/2011 10:55 AM
To: Glenn Block
Subject: [azure-sdk-for-node] issue on linux (#22)
npm install azure

doesn't work on ubuntu

jdavis@LittleDog:~/web$ node tablestore.js

node.js:201
       throw e; // process.nextTick error, or 'error' event on first tick
             ^
Error: Cannot find module './services/table/tableservice'
   at Function._resolveFilename (module.js:334:11)
   at Function._load (module.js:279:25)
   at Module.require (module.js:357:17)
   at require (module.js:368:17)
   at Object. (/home/jdavis/node_modules/azure/lib/azure.js:22:20)
   at Module._compile (module.js:432:26)
   at Object..js (module.js:450:10)
   at Module.load (module.js:351:31)
   at Function._load (module.js:310:12)
   at Module.require (module.js:357:17)
jdavis@LittleDog:~/web$


Reply to this email directly or view it on GitHub:
#22

from azure-sdk-for-node.

unicomp21 avatar unicomp21 commented on May 30, 2024

v0.6.6

nothing written to npm-debug.log

On Saturday, December 31, 2011, Glenn Block <
[email protected]>
wrote:

What version of node? Can you send the npm logs?

Sent from my Windows Phone
From: John Davis
Sent: 12/31/2011 10:55 AM
To: Glenn Block
Subject: [azure-sdk-for-node] issue on linux (#22)
npm install azure

doesn't work on ubuntu

jdavis@LittleDog:~/web$ node tablestore.js

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module './services/table/tableservice'
at Function._resolveFilename (module.js:334:11)
at Function._load (module.js:279:25)
at Module.require (module.js:357:17)
at require (module.js:368:17)
at Object.
(/home/jdavis/node_modules/azure/lib/azure.js:22:20)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Module.require (module.js:357:17)
jdavis@LittleDog:~/web$


Reply to this email directly or view it on GitHub:
#22


Reply to this email directly or view it on GitHub:

#22 (comment)

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

Could you give us more information about the app you're writting ? We do run our tests in Ubuntu / Windows so it seems odd that you're getting issues with an import on ubuntu... Maybe having the actual app would help us in figuring out the issue.

In order to run the tests, I should also mention that we do run "npm install azure".

from azure-sdk-for-node.

unicomp21 avatar unicomp21 commented on May 30, 2024

it's just the sample code

var http = require('http');
var azure = require('azure');
var port = process.env.port || 1337;

var tableService = azure.createTableService();

var tableName = 'tasktable';

http.createServer(function serverCreated(req, res) {
tableService.createTableIfNotExists(tableName, tableCreatedOrExists);

function tableCreatedOrExists(error)
{
res.writeHead(200, { 'Content-Type': 'text/plain' });

   if(error === null){
       res.write('Using table ' + tableName + '\r\n');

       var task1 = {
           PartitionKey : 'tasksSeattle',
           RowKey: '1',
           Description: 'Take out the trash',
           DueDate: new Date(2011, 12, 14, 12)
       };
       tableService.insertEntity(tableName, task1, entityInserted);
   } else {
       res.end('Could not use table: ' + error.Code);
   }

}

function entityInserted(error, serverEntity)
{
if(error === null){
res.end('Successfully inserted entity ' +
serverEntity.Description
+ ' \r\n');
} else {
res.end('Could not insert entity into table: ' + error.Code);
}
}
}).listen(port);
On Saturday, December 31, 2011, Andre Rodrigues <
[email protected]>
wrote:

Could you give us more information about the app you're writting ? We do
run our tests in Ubuntu / Windows so it seems odd that you're getting
issues with an import on ubuntu... Maybe having the actual app would help
us in figuring out the issue.


Reply to this email directly or view it on GitHub:

#22 (comment)

from azure-sdk-for-node.

unicomp21 avatar unicomp21 commented on May 30, 2024

it looks like npm isn't installing all the moduless, node 0.6.6

On Saturday, December 31, 2011, Andre Rodrigues <
[email protected]>
wrote:

Could you give us more information about the app you're writting ? We do
run our tests in Ubuntu / Windows so it seems odd that you're getting
issues with an import on ubuntu... Maybe having the actual app would help
us in figuring out the issue.


Reply to this email directly or view it on GitHub:

#22 (comment)

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

Assigning to me for investigation.

from azure-sdk-for-node.

brenoferreira avatar brenoferreira commented on May 30, 2024

I'm getting the same error on Mac OS X Lion. When I call azure.createTableService(storageAccount, storageKey, ServiceClient.CLOUD_TABLE_HOST) I get: Cannot find module './services/table/tableservice'.

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

This is strange...

Could you guys do:
npm -v
node -v

and check if your node_modules directory contains, at least, the following structure:
andre@andrerod-laptop:/Workspace/node_modules$ ls
azure
andre@andrerod-laptop:
/Workspace/node_modules$ cd azure/node_modules/
andre@andrerod-laptop:~/Workspace/node_modules/azure/node_modules$ ls
log mime qs sax xml2js xmlbuilder

and "server.js" (or whatever is the main file in your app) is under Workspace/ (for my example).

I'm mostly asking it because i just tried this on a machine running Ubuntu 11.10 and it worked for me ... :/

from azure-sdk-for-node.

brenoferreira avatar brenoferreira commented on May 30, 2024

npm -v: 1.0.106 node -v: 0.6.6
Inside the node_modules/azure folder, I have the following directories structure:

Brenos-MacBook-Air:azure copy brenoferreira$ ls -R
LICENSE.txt lib package.json
README.md node_modules test

./lib:
azure.js

./node_modules:
log qs xml2js
mime sax xmlbuilder

./node_modules/log:
History.md Readme.md index.html lib
Makefile examples index.js package.json

./node_modules/log/examples:
file.js file.log reader.js stdout.js

./node_modules/log/lib:
log.js

./node_modules/mime:
LICENSE mime.js test.js
README.md package.json types

./node_modules/mime/types:
mime.types node.types

./node_modules/qs:
History.md Readme.md examples.js lib test
Makefile benchmark.js index.js package.json

./node_modules/qs/lib:
querystring.js

./node_modules/qs/test:
mocha.opts parse.js stringify.js

./node_modules/sax:
AUTHORS README.md lib test
LICENSE examples package.json

./node_modules/sax/examples:
big-not-pretty.xml not-pretty.xml switch-bench.js
example.js pretty-print.js test.html
get-products.js shopping.xml test.xml
hello-world.js strict.dtd

./node_modules/sax/lib:
sax.js

./node_modules/sax/test:
buffer-overrun.js self-closing-child-strict.js
cdata-chunked.js self-closing-child.js
cdata-end-split.js self-closing-tag.js
cdata-fake-end.js stray-ending.js
cdata-multiple.js trailing-non-whitespace.js
cdata.js unquoted.js
index.js xmlns-issue-41.js
issue-23.js xmlns-rebinding.js
issue-30.js xmlns-strict.js
issue-35.js xmlns-unbound.js
issue-47.js xmlns-xml-default-prefix-attribute.js
issue-49.js xmlns-xml-default-prefix.js
parser-position.js xmlns-xml-default-redefine.js
script.js

./node_modules/xml2js:
Cakefile README.md package.json test
LICENSE lib src

./node_modules/xml2js/lib:
xml2js.js

./node_modules/xml2js/src:
xml2js.coffee

./node_modules/xml2js/test:
fixtures xml2js.test.coffee

./node_modules/xml2js/test/fixtures:
sample.xml

./node_modules/xmlbuilder:
lib package.json

./node_modules/xmlbuilder/lib:
XMLBuilder.js XMLFragment.js index.js

./test:
azure-tests.js runextendedtests.js runtests.js
extendedtestlist.txt runjshint.js testlist.txt

I've tried to install it on a Windows machine, and it worked fine. So, as a workaround, I just copied and pasted the files from Windows into the Mac.

from azure-sdk-for-node.

brenoferreira avatar brenoferreira commented on May 30, 2024

Apparently, it's missing some files in the "lib" folder, I don't know why npm is not downloading it.

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

I see. I still haven't been able to reproduce but you're probably right that there seems to exist an issue with the packaging. We did publish the npm package from windows so it might have something to do with it. I assume it's reproducing 100% of the times on mac?

from azure-sdk-for-node.

brenoferreira avatar brenoferreira commented on May 30, 2024

Well, it happened everytime I tried to install the package on OSX. I'll try to update NPM on the Mac and see what happens (on Windows, I'm running v1.1.0 beta 4)

from azure-sdk-for-node.

brenoferreira avatar brenoferreira commented on May 30, 2024

Just updated NPM to version 1.1.0-2 and I'm still getting the same error.

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

@brenoferreira: I've just republished the package using the latest NPM version (1.1.0) and sent you an email so that we can try to find out what's wrong if the problem still reproduces...

from azure-sdk-for-node.

brenoferreira avatar brenoferreira commented on May 30, 2024

I've unninstalled both Node and NPM and reinstalled everything from scratch, and I'm still getting the same error. The only file in the lib folder is azure.js.

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

Few more questions:

  • Have you cleared your npm cache ?
  • Are you sure you dont have azure as a global module somewhere ? what kind of install are you trying ? local or global ?
  • Are you sure you aint getting npm errors ?

npm http GET https://registry.npmjs.org/sax
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/log
npm http GET https://registry.npmjs.org/xmlbuilder
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/xml2js
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/log
npm http 304 https://registry.npmjs.org/xmlbuilder
npm http 304 https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/xml2js
[email protected] ./azure
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

It should output something like this.

from azure-sdk-for-node.

brenoferreira avatar brenoferreira commented on May 30, 2024

Here's the output from the npm install azure command:

npm http GET https://registry.npmjs.org/azure
npm http 304 https://registry.npmjs.org/azure
npm http GET https://registry.npmjs.org/xml2js
npm http GET https://registry.npmjs.org/sax
npm http GET https://registry.npmjs.org/xmlbuilder
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/log
npm http GET https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/xml2js
npm http 304 https://registry.npmjs.org/xmlbuilder
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/log
[email protected] ./node_modules/azure
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

304 actually means it's cached. Could you remove the cache and see if it still happens ? just to make sure that's not the reason.

from azure-sdk-for-node.

brenoferreira avatar brenoferreira commented on May 30, 2024

Just cleaned the cache and it worked!!! Thanks Andre!!

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

Awesome. No worries.

from azure-sdk-for-node.

jpgarcia avatar jpgarcia commented on May 30, 2024

Guys, I'm having the same issue running on Mac even removing cache. The services folder is not being downloaded. I'm trying to install the latest v0.5.2 without luck

Any ideas?

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

Hi Juan,

I did publish this yesterday on windows. Let me try to publish (later today) from a non windows npm version to see if it fixes the problem.

Andre

from azure-sdk-for-node.

jpgarcia avatar jpgarcia commented on May 30, 2024

Ok, thank you for your quick response!

from azure-sdk-for-node.

andrerod avatar andrerod commented on May 30, 2024

@jpgarcia : i've updated the npm package. Seems to be working now for the folks I've asked. Could you confirm it's ok for you now also ?

Thanks,
Andre

from azure-sdk-for-node.

isaacs avatar isaacs commented on May 30, 2024

Afaict, this is an issue with npm 1.0 handling packages between windows and unix, especially unixes that use gnutar (such as linux), and extra-especially unixes with a gnutar version < 1.22 or so (CentOS, the most popular Linux, ships with 1.15.1).

npm 1.1 is much more resilient to this error, since tar is done entirely in JS, and node-tar is explicitly designed to work for npm's use cases. However, if you have tarballs in the cache already, they might be broken.

I'd recommend updating to npm 1.1, clearing the cache, etc. Which you've already done :)

Please mention "@isaacs" in the bug if this happens again, or post it at https://github.com/isaacs/npm/issues. Thanks :)

from azure-sdk-for-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.