#Following NodeJS Get Started on windows, but not able to write to host directory

1 messages ยท Page 1 of 1 (latest)

static plaza
#

I am using the example from here https://github.com/dagger/examples/tree/main/nodejs on windows.
every step is working without any error, but I'm not able to export the created build directorie in the last step and write it to the host file system.

I'm getting a "ClientError" but I'm not able to solve it...
Could anyone helo me on how to find the needed information, as I'm new to dagger its kind of hard?

GitHub

Contribute to dagger/examples development by creating an account on GitHub.

fallow topaz
#

You can already use it when using dagger in development mode

#

But it seems that you have another issue, can you please paste the output

static plaza
#

checking the package.json, I'm using 0.2.1

fallow topaz
#

You shall totally upgrade yes ๐Ÿ™

#

Keep us in touch, after having upgraded ๐Ÿ˜‡ (it might break a little the example)

static plaza
#

if I follow the steps in the link you provided and updating the tsconfig.json, I'm getting this error $ node --loader ts-node/esm ./build.ts
(node:27512) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
ReferenceError: exports is not defined in ES module scope
at file:///C:/bIT/develop/Repos/et57/react-build/build.ts:38:23
at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:61:12)

fallow topaz
#

cc @full mulch

full mulch
#

if yes can you set module to ESNext ?
"module": "ESNext"

static plaza
#

Hey ๐Ÿ‘‹ will check that tomorrow and keep you posted! Thanks for your fast answer!

static plaza
static plaza
#

I did also created a new project from the template...

full mulch
static plaza
#

{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": [
"src"
]
}

#

after some testing, it looks like there could be a escaping problem with paths on windows

fallow topaz
fallow topaz
#

As you're on Windows, I would recommend waiting for the next release (probably next week), as running the dev engine on Windows is still a bit tricky