code4romania / czl-scrape

99 problems, but a scrape ain't one.
http://cezicelegea.ro/
Mozilla Public License 2.0
13 stars 20 forks source link

[Afaceri] Error importing node module #57

Closed margelatu closed 7 years ago

margelatu commented 7 years ago

Ran npm install, went smoothly. Ran node server/server.js and got:

module.js:457
    throw err;
    ^

Error: Cannot find module 'string'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/imargela/Work/projects/code4ro/czl-scrape/afaceri/server/controllers/contentParser.js:14:14)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/imargela/Work/projects/code4ro/czl-scrape/afaceri/server/server.js:5:21)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)

npm v3.10.3 node v6.4.0

margelatu commented 7 years ago

Upgraded to latest versions of npm (v4.1.2) and node (v7.7.3). Same error, slightly different stacktrace :

$ node server/server.js
module.js:472
    throw err;
    ^

Error: Cannot find module 'string'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/imargela/Work/projects/code4ro/czl-scrape/afaceri/server/controllers/contentParser.js:14:14)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/imargela/Work/projects/code4ro/czl-scrape/afaceri/server/server.js:5:21)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
abouariu commented 7 years ago

I think I was testing with different string parser libraries and forgot to save the final one to package.json. I'll check and commit changes.

margelatu commented 7 years ago

@abouariu : thanks, man

abouariu commented 7 years ago

Fixed

margelatu commented 7 years ago

Confirmed. Fixed by #61