Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

path.js throw error, Path must be a string. Received ' + inspect(path); #807

Closed
shoaibik opened this issue May 3, 2016 · 7 comments
Closed

Comments

@shoaibik
Copy link

shoaibik commented May 3, 2016

When I run npm run production or npm run package, in the process Starting 'lint'... it throws the error.

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1324:5)
    at /path-to-fp/www/html/sites/metal/site/wp-content/themes/FoundationPress/node_modules/clean-css/lib/utils/input-source-map-tracker.js:191:56
    at Array.forEach (native)
    at trackContentSources (/path-to-fp/FoundationPress/node_modules/clean-css/lib/utils/input-source-map-tracker.js:188:20)
    at InputSourceMapStore.trackLoaded (/path-to-fp/FoundationPress/node_modules/clean-css/lib/utils/input-source-map-tracker.js:255:3)
    at fromString (/path-to-fp/FoundationPress/node_modules/clean-css/lib/utils/input-source-map-tracker.js:32:8)
    at InputSourceMapStore.track (/path-to-fp/FoundationPress/node_modules/clean-css/lib/utils/input-source-map-tracker.js:236:5)
    at Object.whenDone (/path-to-fp/FoundationPress/node_modules/clean-css/lib/clean.js:145:44)
    at processNext (/path-to-fp/FoundationPress/node_modules/clean-css/lib/imports/inliner.js:105:13)

npm ERR! Linux 4.2.0-35-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "package"
npm ERR! node v6.0.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] package: `gulp package --production`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] package script 'gulp package --production'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the foundationpress package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp package --production
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs foundationpress
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls foundationpress
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /path-to-fp/FoundationPress/npm-debug.log

I am running

  • node v 6.0.0
  • npm 3.8.6
  • ubuntu 14.04 LTS
@olefredrik
Copy link
Owner

This project requires Node.js v4.x.x to be installed on your machine. Please be aware that you may encounter problems with the installation if you are using v5.x.x or v6.x.x

@shoaibik
Copy link
Author

shoaibik commented May 3, 2016

Thank you, I will try using v4 and will update the issue.

@olefredrik
Copy link
Owner

olefredrik commented May 3, 2016

If you require different versions of Node.js for different projects, I would recommend using nvm. https://www.npmjs.com/package/nvm

@shoaibik
Copy link
Author

shoaibik commented May 3, 2016

Thank you, it worked after using node v4.4.3 and I used nvm.

@shoaibik shoaibik closed this as completed May 3, 2016
@olefredrik
Copy link
Owner

Great! Enjoy :)

@jamivinaysagar
Copy link

node -v
v4.4.7
npm -v
4.5.0
I am using as above, still facing the same issue.

@jamivinaysagar
Copy link

nyc npm run test
path.js:8
throw new TypeError('Path must be a string. Received ' +
^

TypeError: Path must be a string. Received [ '.nycrc', '.nycrc.json' ]
at assertPath (path.js:8:11)
at Object.posix.resolve (path.js:426:5)
at join (/usr/local/lib/node_modules/nyc/node_modules/find-up/index.js:11:14)
at Function.module.exports.sync (/usr/local/lib/node_modules/nyc/node_modules/find-up/index.js:43:12)
at Object.Config.loadConfig (/usr/local/lib/node_modules/nyc/lib/config-util.js:17:23)
at Object. (/usr/local/lib/node_modules/nyc/bin/nyc.js:23:25)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants