Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"path should be a string" error #243

Open
bohdyone opened this issue Oct 19, 2017 · 1 comment
Open

"path should be a string" error #243

bohdyone opened this issue Oct 19, 2017 · 1 comment

Comments

@bohdyone
Copy link

Hi,

The very first thing when I try to use lasso-cli as per the examples is that I get a fatal error, and I can't continue. Even using the simplest use cases.

No idea what's going on here. test.js just consists of:

var c = require('change-case');

Big fat error is:

Bogdans-MacBook-Pro:Tabber boggers$ pwd
/Users/boggers/Google Drive/Code/Tabber
Bogdans-MacBook-Pro:Tabber boggers$ lasso --main test.js
Config:
{
    "outputDir": "/Users/boggers/Google Drive/Code/Tabber/static",
    "urlPrefix": "%STATIC_PATH%",
    "fingerprintsEnabled": false
}

Optimizing page "test"...
Failed to lasso page "test"! Reason: Error: Failed to walk dependency [require: /Users/boggers/Google Drive/Code/Tabber/test.js]. Dependency chain: [require: /Users/boggers/Google Drive/Code/Tabber/test.js]. Cause: AssertionError [ERR_ASSERTION]: path should be a string
    at module.exports (/usr/local/lib/node_modules/lasso-cli/node_modules/lasso/node_modules/raptor-util/createError.js:7:50)
    at AsyncValue.<anonymous> (/usr/local/lib/node_modules/lasso-cli/node_modules/lasso/lib/dependency-walker.js:141:48)
    at notifyCallbacks (/usr/local/lib/node_modules/lasso-cli/node_modules/raptor-async/AsyncValue.js:76:35)
    at AsyncValue.reject (/usr/local/lib/node_modules/lasso-cli/node_modules/raptor-async/AsyncValue.js:240:9)
    at getDependenciesCallback (/usr/local/lib/node_modules/lasso-cli/node_modules/lasso/lib/dependencies/Dependency.js:373:47)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
Caused by: AssertionError [ERR_ASSERTION]: path should be a string
    at getClientPath (/usr/local/lib/node_modules/lasso-cli/node_modules/lasso-modules-client/transport/src/getClientPath.js:11:5)
    at handleMetaInstalled (/usr/local/lib/node_modules/lasso-cli/node_modules/lasso-require/src/dep-require.js:113:40)
    at handleMeta (/usr/local/lib/node_modules/lasso-cli/node_modules/lasso-require/src/dep-require.js:186:21)
    at /usr/local/lib/node_modules/lasso-cli/node_modules/lasso-require/src/dep-require.js:494:33
    at Array.forEach (<anonymous>)
    at requireHandler.init.then.then.then (/usr/local/lib/node_modules/lasso-cli/node_modules/lasso-require/src/dep-require.js:489:34)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
------------------------------------
1 page(s) failed to build
@bohdyone
Copy link
Author

Actually, I found out what it was; I never did an npm init!

Still, I think the error should probably be a bit more user friendly :)

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

No branches or pull requests

1 participant