dawson-org / dawson-cli

A serverless web framework for Node.js on AWS (CloudFormation, CloudFront, API Gateway, Lambda)
https://dawson.sh
GNU General Public License v3.0
713 stars 25 forks source link

Cannot find module 'npmlog' #193

Closed brandoncorbin closed 7 years ago

brandoncorbin commented 7 years ago

Cannot seem to get past this hiccup. Any ideas?

node -v v8.1.3 npm -v 5.0.3

Error: Command failed: /bin/sh -c cd .dawson-dist && NODE_ENV=production npm install --production babel-cli babel-polyfill babel-preset-env babel-plugin-transform-object-rest-spread babel-preset-dawson && NODE_ENV=production npm install --production && chmod -Rf a+rX .
module.js:487
    throw err;
    ^

Error: Cannot find module 'npmlog'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at /Users/brandon/node_modules/npm/bin/npm-cli.js:18:11
    at Object.<anonymous> (/Users/brandon/node_modules/npm/bin/npm-cli.js:75:3)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)

    at Promise.all.then.arr (/Users/brandon/.npm-packages/lib/node_modules/dawson/node_modules/execa/index.js:210:11)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:208:7)
lusentis commented 7 years ago

Mh... i seems to be an npm-cli error (at /Users/brandon/node_modules/npm/bin/npm-cli.js:18:11) have you tried to upgrade npm or re-install node?

npmlog is "The logger that npm uses"

lusentis commented 7 years ago

Just tried to deploy the example 0 from dawson-examples with node 8.1.3 / npm 5.0.3 (on Ubuntu) and it worked, so that should definitively be an npm internal error which will be resolved by reinstalling that node version or upgrading npm.

brandoncorbin commented 7 years ago

Ugh, sorry for bothering you with this. I should have paid closer attention. I'm in NPM update hell right now - and a fresh brew install doesn't help.

This is definitely not a Dawson problem.

lusentis commented 7 years ago

don't worry, this might be helpful to others in the future, too. If you're on a Mac, you can uninstall brewed node and use nvm instead, that should help.

brandoncorbin commented 7 years ago

Removing all things NPM, and going with nvm instead - made all my problems go away. Thanks for all of the amazing work!