在MarkoJs“入门”教程中获取错误

时间:2019-03-24 20:57:22

标签: node.js marko lasso-js

我是Node.js和Marko的新手。在“ {Installing”部分中获取错误。

尝试以下命令时出现错误:

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

任何帮助都会很棒。
错误:

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)

1 个答案:

答案 0 :(得分:1)

您正在运行的命令引用client.js(在当前工作目录中)作为js入口点。该文件是否存在于您的计算机上?