You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.
I'm trying to write a systemjs plugin, but facing a hard time of "require" a npm module. The require always tries to resolve the node module from right at the root of the app, instead of node_modules folder. Why? How systemjs builder resolve the plugins and teach the plugins to load subsequent node modules?
It fails even this is the only line in my plugin.js. I have installed less both via jspm install npm:less and npm install less. By the way, is it possible to pass --no-optional through jspm install to npm install? The dependencies pulled in via jspm install npm:less is a little crazy... :(
varlessc=require("less");
E:\__prj\systemjs-test>node build.js
Build error
[Error: ENOENT: no such file or directory, open 'E:\__prj\systemjs-test\asap.js']
Thanks!
The text was updated successfully, but these errors were encountered:
I just realized, it is not just _nodeRequire is required to use here, but also the respective node module has to be installed by npm install...
Why can't systemjs load the modules installed by jspm install when executing in node? Now we have to duplicate the npm packages, if we have to use the package in both browser and node? :(
I'm trying to write a systemjs plugin, but facing a hard time of "require" a npm module. The require always tries to resolve the node module from right at the root of the app, instead of node_modules folder. Why? How systemjs builder resolve the plugins and teach the plugins to load subsequent node modules?
It fails even this is the only line in my plugin.js. I have installed less both via
jspm install npm:less
andnpm install less
. By the way, is it possible to pass--no-optional
through jspm install to npm install? The dependencies pulled in via jspm install npm:less is a little crazy... :(Thanks!
The text was updated successfully, but these errors were encountered: