Local Development Environment setup

Hi guys,

when I try to start up a local dev environment (Local Development Environment | Speckle Docs) for speckle-server I run into the following error:

[@speckle/frontend-2]: ERROR Nuxt Build Error: Invalid pattern "\_nuxt\entry.[hash].js" for "output.entryFileNames", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.

Removing the leading slash on line 10 in nuxt.config.ts seems to get rid of this error, but instead I get:

[@speckle/frontend-2]: ERROR Cannot find module whatwg-url/webidl2js-wrapper imported from file:///C:/git/speckle-server/packages/frontend-2/node_modules, file:///C:/git/speckle-server/node_modules, file:///C:/git/speckle-server/packages/frontend-2/node_modules/nuxt/node_modules, file:///C:/git/speckle-server/packages/frontend-2/node_modules/nitropack/node_modules, file:///C:/git/speckle-server/packages/frontend-2/, file:///C:/git/speckle-server/packages/frontend-2/node_modules/_index.js, file:///C:/git/speckle-server/packages/frontend-2/node_modules, file:///C:/git/speckle-server/, file:///C:/git/speckle-server/node_modules/_index.js, file:///C:/git/speckle-server/node_modules, file:///C:/git/speckle-server/packages/frontend-2/node_modules/nuxt/, file:///C:/git/speckle-server/packages/frontend-2/node_modules/nuxt/node_modules/_index.js, file:///C:/git/speckle-server/packages/frontend-2/node_modules/nuxt/node_modules, file:///C:/git/speckle-server/packages/frontend-2/node_modules/nitropack/, file:///C:/git/speckle-server/packages/frontend-2/node_modules/nitropack/node_modules/_index.js, file:///C:/git/speckle-server/packages/frontend-2/node_modules/nitropack/node_modules

Any ideas?

I am running Windows 11 with Node.js v18.20.4

Cheers,
Til

Hi,

One of the causes of this can be when the node packages are not installed correctly, causing the output of the function you described to be incorrect. Could you try removing the node_modules folder and reinstalling the packages, and see if this still persists? I just tested with the same node version and it should work as expected

2 Likes

Hi Mike,
thanks for your suggestion. Unfortunately, that didn´t help.
I also tried on a second computer (with Node.js 20) and ran into the same issue.

Hi @tlmn , As per the docs -

Speckle server has been developed on Linux, Windows WSL2, and MacOS. It does not work on Windows without WSL2.

1 Like

the error raised in nuxt.config.ts file under frontend-2 folder, according to the error message, adjusted as follows can remove the error.

const buildOutputFileName = (chunkName: string) =>
join(‘_nuxt’, ${sanitizeFilePath(filename(chunkName))}.[hash].js) //.[hash].js .${Timestamp}.js
// withoutLeadingSlash(
// join(‘/_nuxt/’, ${sanitizeFilePath(filename(chunkName))}.[hash].js)
// )

hope it helps you.