2

I'm a newbie at Node.js and Marko. Getting errors in the "Installing" section.

Getting the error when I try the following command:

lasso --main client.js --plugins lasso-marko --inject-into index.html

Any help will be great.
Error:

PS C:\Data\Repository\personal-finance\web-site\hello-world> lasso --main client.js --plugins lasso-marko --inject-into index.html
Config:
{
    "outputDir": "C:\\Data\\Repository\\personal-finance\\web-site\\hello-world\\static",
    "urlPrefix": "%STATIC_PATH%",
    "fingerprintsEnabled": false,
    "plugins": [
        "lasso-marko"
    ]
}

Optimizing page "index"...
C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso-require\src\dep-require.js:243
                        throw new Error('Module not found: ' + path + ' (from "' + from + '" and referenced in "' + fromFileRelPath + '")');
                        ^

Error: Module not found: C:\Data\Repository\personal-finance\web-site\hello-world\client.js (from "C:\Data\Repository\personal-finance\web-site\hello-world" and referenced in "(unknown)")
    at Ctor.init [as doInit] (C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso-require\src\dep-require.js:243:31)
    at Ctor.init (C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependencies\Dependency.js:177:32)
    at walkDependency (C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependency-walker.js:91:20)
    at C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependency-walker.js:40:17
    at series (C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\raptor-async\series.js:40:13)
    at walkDependencies (C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependency-walker.js:50:9)
    at C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\dependency-walker.js:84:17
    at AsyncValue.<anonymous> (C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\LassoManifest.js:145:13)
    at AsyncValue.done (C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\raptor-async\AsyncValue.js:200:29)
    at DependencyList.normalize (C:\Users\Pranav\AppData\Roaming\npm\node_modules\lasso-cli\node_modules\lasso\lib\DependencyList.js:57:35)
Pranav Shah
  • 3,233
  • 3
  • 30
  • 47

1 Answers1

1

The command you are running references client.js (In the current working directory) as the js entry point. Does this file exist on your machine?

Piercey4
  • 1,318
  • 11
  • 10
  • Thanks. I looked back and realized my mistake. I did not have the "client.js" file. Got the server and static instructions mixed. One thing that I think though is missing from the documentation is that I need to run "npm init -y", before running the lasso command -- ["path should be a string" error #243](https://github.com/lasso-js/lasso/issues/243) – Pranav Shah Mar 26 '19 at 03:56