Dojo build via Node fails with non-standard util folder path
Dojo build via Node fails with non-standard util folder path. It can happen, when using npm to manage project's dependencies. With npm you would install dojo/util as npm install dojo-util, which places the util at the node_modules/dojo-util folder.
Building Dojo with Node in such a case, results in an error: Error: ENOENT: no such file or directory, open '/Users/XYZ/Projects/dojo-boilerplate/node_modules/util/build/main.js'.
I can fix the build, by manually editing dojo/dojo.js@L2012-2018, replacing the build and doh package configurations with:
I'd prefer a configuration-based way to re-route the util folder to a non-standard location.
Re: Dojo build via Node fails with non-standard util folder path
The challenge we've had that has led to this is that npm does not allow
name aliasing, so unless you're the first package with a name, you
cannot be that package.
npm does support scoped packages, e.g. @dojo/package , but this doesn't
work with bower. So for util, themes, and dstore, we're left with dojo-*.
The configuration based way to reroute is to set the package
configuration using a configuration files rather than modifying dojo.js
You may specify a package configuration both within the loading of your
app, as well as within your build profile, under the packages setting.
on 2/11/17, 16:04 (GMT-07:00) sindilevich said the following:
> Dojo 1.12.1.
> Dojo build via Node fails with non-standard *util* folder path. It can
> happen, when using *npm* to manage project's dependencies. With npm you
> would install *dojo/util* as /npm install dojo-util/, which places the util
> at the *node_modules/dojo-util* folder.
> Building Dojo with Node in such a case, results in an error: *Error: ENOENT:
> no such file or directory, open
> I can fix the build, by manually editing *dojo/dojo.js@L2012-2018*,
> replacing the /build/ and /doh/ package configurations with:
> I'd prefer a configuration-based way to re-route the util folder to a
> non-standard location.
> Your help is much appreciated!
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Dojo-build-via-Node-fails-with-non-standard-util-folder-path-tp4007131.html > Sent from the Dojo Toolkit mailing list archive at Nabble.com.