Nodejs code fails to build on Windows10 but works on MacOS. What might be the cause?

Multi tool use
I am trying to build and deploy the code from https://github.com/Autodesk-Forge/forge-rcdb.nodejs on Windows10
On MacOS, I successfully build it in the development environment, and now I am trying to make it happen on Windows. I followed the same steps, on Windows, I used:
$env:NODE_ENV = "developement"
$env:HOT_RELOADING="true"
npm start
But my Powershell shows:
> forge-rcdb@4.0.0 start D:Documentsforge-rcdb.nodejs
> node bin/start.js
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '../../config/developement.config.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:Documentsforge-rcdb.nodejsnode_modulesc0nfigindex.js:10:14)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.require.extensions.(anonymous function) [as .js] (D:Documentsforge-rcdb.nodejsnode_modulesbabel-registerlibnode.js:152:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! forge-rcdb@4.0.0 start: `node bin/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the forge-rcdb@4.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersyangdihanAppDataRoamingnpm-cache_logs2018-12-28T21_12_28_942Z-debug.log
PS D:Documentsforge-rcdb.nodejs> npm install cairo
npm ERR! code E404
npm ERR! 404 Not Found: cairo@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersyangdihanAppDataRoamingnpm-cache_logs2018-12-28T21_20_30_522Z-debug.log
Might this be caused because Windows has backslash instead of slash for path?
node.js reactjs autodesk-forge autodesk-viewer
add a comment |
I am trying to build and deploy the code from https://github.com/Autodesk-Forge/forge-rcdb.nodejs on Windows10
On MacOS, I successfully build it in the development environment, and now I am trying to make it happen on Windows. I followed the same steps, on Windows, I used:
$env:NODE_ENV = "developement"
$env:HOT_RELOADING="true"
npm start
But my Powershell shows:
> forge-rcdb@4.0.0 start D:Documentsforge-rcdb.nodejs
> node bin/start.js
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '../../config/developement.config.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:Documentsforge-rcdb.nodejsnode_modulesc0nfigindex.js:10:14)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.require.extensions.(anonymous function) [as .js] (D:Documentsforge-rcdb.nodejsnode_modulesbabel-registerlibnode.js:152:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! forge-rcdb@4.0.0 start: `node bin/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the forge-rcdb@4.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersyangdihanAppDataRoamingnpm-cache_logs2018-12-28T21_12_28_942Z-debug.log
PS D:Documentsforge-rcdb.nodejs> npm install cairo
npm ERR! code E404
npm ERR! 404 Not Found: cairo@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersyangdihanAppDataRoamingnpm-cache_logs2018-12-28T21_20_30_522Z-debug.log
Might this be caused because Windows has backslash instead of slash for path?
node.js reactjs autodesk-forge autodesk-viewer
1
Have you runnpm install
on Mac and then tried to use the same directory under Windows? If so, removenode_modules
and runnpm install
again, there might be native modules in there which are build for Mac instead of Windows.
– Lukas Knuth
Dec 28 '18 at 21:42
also, it looks like "development" is mispelled.
– 4m1r
Dec 28 '18 at 22:19
Yes, I did run {npm install} on windows. There are several warns but no errors
– DiHan Yang
Dec 29 '18 at 0:22
Please check my instruction here, it might help: stackoverflow.com/a/50284712/7745569
– Eason Kang
Dec 29 '18 at 3:50
add a comment |
I am trying to build and deploy the code from https://github.com/Autodesk-Forge/forge-rcdb.nodejs on Windows10
On MacOS, I successfully build it in the development environment, and now I am trying to make it happen on Windows. I followed the same steps, on Windows, I used:
$env:NODE_ENV = "developement"
$env:HOT_RELOADING="true"
npm start
But my Powershell shows:
> forge-rcdb@4.0.0 start D:Documentsforge-rcdb.nodejs
> node bin/start.js
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '../../config/developement.config.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:Documentsforge-rcdb.nodejsnode_modulesc0nfigindex.js:10:14)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.require.extensions.(anonymous function) [as .js] (D:Documentsforge-rcdb.nodejsnode_modulesbabel-registerlibnode.js:152:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! forge-rcdb@4.0.0 start: `node bin/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the forge-rcdb@4.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersyangdihanAppDataRoamingnpm-cache_logs2018-12-28T21_12_28_942Z-debug.log
PS D:Documentsforge-rcdb.nodejs> npm install cairo
npm ERR! code E404
npm ERR! 404 Not Found: cairo@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersyangdihanAppDataRoamingnpm-cache_logs2018-12-28T21_20_30_522Z-debug.log
Might this be caused because Windows has backslash instead of slash for path?
node.js reactjs autodesk-forge autodesk-viewer
I am trying to build and deploy the code from https://github.com/Autodesk-Forge/forge-rcdb.nodejs on Windows10
On MacOS, I successfully build it in the development environment, and now I am trying to make it happen on Windows. I followed the same steps, on Windows, I used:
$env:NODE_ENV = "developement"
$env:HOT_RELOADING="true"
npm start
But my Powershell shows:
> forge-rcdb@4.0.0 start D:Documentsforge-rcdb.nodejs
> node bin/start.js
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '../../config/developement.config.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:Documentsforge-rcdb.nodejsnode_modulesc0nfigindex.js:10:14)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.require.extensions.(anonymous function) [as .js] (D:Documentsforge-rcdb.nodejsnode_modulesbabel-registerlibnode.js:152:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! forge-rcdb@4.0.0 start: `node bin/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the forge-rcdb@4.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersyangdihanAppDataRoamingnpm-cache_logs2018-12-28T21_12_28_942Z-debug.log
PS D:Documentsforge-rcdb.nodejs> npm install cairo
npm ERR! code E404
npm ERR! 404 Not Found: cairo@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersyangdihanAppDataRoamingnpm-cache_logs2018-12-28T21_20_30_522Z-debug.log
Might this be caused because Windows has backslash instead of slash for path?
node.js reactjs autodesk-forge autodesk-viewer
node.js reactjs autodesk-forge autodesk-viewer
asked Dec 28 '18 at 21:33
DiHan YangDiHan Yang
82
82
1
Have you runnpm install
on Mac and then tried to use the same directory under Windows? If so, removenode_modules
and runnpm install
again, there might be native modules in there which are build for Mac instead of Windows.
– Lukas Knuth
Dec 28 '18 at 21:42
also, it looks like "development" is mispelled.
– 4m1r
Dec 28 '18 at 22:19
Yes, I did run {npm install} on windows. There are several warns but no errors
– DiHan Yang
Dec 29 '18 at 0:22
Please check my instruction here, it might help: stackoverflow.com/a/50284712/7745569
– Eason Kang
Dec 29 '18 at 3:50
add a comment |
1
Have you runnpm install
on Mac and then tried to use the same directory under Windows? If so, removenode_modules
and runnpm install
again, there might be native modules in there which are build for Mac instead of Windows.
– Lukas Knuth
Dec 28 '18 at 21:42
also, it looks like "development" is mispelled.
– 4m1r
Dec 28 '18 at 22:19
Yes, I did run {npm install} on windows. There are several warns but no errors
– DiHan Yang
Dec 29 '18 at 0:22
Please check my instruction here, it might help: stackoverflow.com/a/50284712/7745569
– Eason Kang
Dec 29 '18 at 3:50
1
1
Have you run
npm install
on Mac and then tried to use the same directory under Windows? If so, remove node_modules
and run npm install
again, there might be native modules in there which are build for Mac instead of Windows.– Lukas Knuth
Dec 28 '18 at 21:42
Have you run
npm install
on Mac and then tried to use the same directory under Windows? If so, remove node_modules
and run npm install
again, there might be native modules in there which are build for Mac instead of Windows.– Lukas Knuth
Dec 28 '18 at 21:42
also, it looks like "development" is mispelled.
– 4m1r
Dec 28 '18 at 22:19
also, it looks like "development" is mispelled.
– 4m1r
Dec 28 '18 at 22:19
Yes, I did run {npm install} on windows. There are several warns but no errors
– DiHan Yang
Dec 29 '18 at 0:22
Yes, I did run {npm install} on windows. There are several warns but no errors
– DiHan Yang
Dec 29 '18 at 0:22
Please check my instruction here, it might help: stackoverflow.com/a/50284712/7745569
– Eason Kang
Dec 29 '18 at 3:50
Please check my instruction here, it might help: stackoverflow.com/a/50284712/7745569
– Eason Kang
Dec 29 '18 at 3:50
add a comment |
2 Answers
2
active
oldest
votes
Looks like there's a typo(developement
) for development
and that caused the error:
Error: Cannot find module '../../config/developement.config.js'
Set your environment to a corresponding profile in the config
folder, otherwise the c0nfig
library won't be able to locate the configuration:
config -
|--- development.config.js
|--- production.config.js
add a comment |
I solved eventually.
The solution is to install Python2.7, C++ compiler, c# compiler. Just use Visual Studio installer to install them is okay.
Then very probably need to need to fix npm canvas/cairo, following this instruction: https://github.com/benjamind/delarre.docpad/blob/master/src/documents/posts/installing-node-canvas-for-windows.html.md
then everything works
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53964498%2fnodejs-code-fails-to-build-on-windows10-but-works-on-macos-what-might-be-the-ca%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Looks like there's a typo(developement
) for development
and that caused the error:
Error: Cannot find module '../../config/developement.config.js'
Set your environment to a corresponding profile in the config
folder, otherwise the c0nfig
library won't be able to locate the configuration:
config -
|--- development.config.js
|--- production.config.js
add a comment |
Looks like there's a typo(developement
) for development
and that caused the error:
Error: Cannot find module '../../config/developement.config.js'
Set your environment to a corresponding profile in the config
folder, otherwise the c0nfig
library won't be able to locate the configuration:
config -
|--- development.config.js
|--- production.config.js
add a comment |
Looks like there's a typo(developement
) for development
and that caused the error:
Error: Cannot find module '../../config/developement.config.js'
Set your environment to a corresponding profile in the config
folder, otherwise the c0nfig
library won't be able to locate the configuration:
config -
|--- development.config.js
|--- production.config.js
Looks like there's a typo(developement
) for development
and that caused the error:
Error: Cannot find module '../../config/developement.config.js'
Set your environment to a corresponding profile in the config
folder, otherwise the c0nfig
library won't be able to locate the configuration:
config -
|--- development.config.js
|--- production.config.js
edited Jan 4 at 8:05
answered Jan 2 at 3:13


Bryan HuangBryan Huang
39749
39749
add a comment |
add a comment |
I solved eventually.
The solution is to install Python2.7, C++ compiler, c# compiler. Just use Visual Studio installer to install them is okay.
Then very probably need to need to fix npm canvas/cairo, following this instruction: https://github.com/benjamind/delarre.docpad/blob/master/src/documents/posts/installing-node-canvas-for-windows.html.md
then everything works
add a comment |
I solved eventually.
The solution is to install Python2.7, C++ compiler, c# compiler. Just use Visual Studio installer to install them is okay.
Then very probably need to need to fix npm canvas/cairo, following this instruction: https://github.com/benjamind/delarre.docpad/blob/master/src/documents/posts/installing-node-canvas-for-windows.html.md
then everything works
add a comment |
I solved eventually.
The solution is to install Python2.7, C++ compiler, c# compiler. Just use Visual Studio installer to install them is okay.
Then very probably need to need to fix npm canvas/cairo, following this instruction: https://github.com/benjamind/delarre.docpad/blob/master/src/documents/posts/installing-node-canvas-for-windows.html.md
then everything works
I solved eventually.
The solution is to install Python2.7, C++ compiler, c# compiler. Just use Visual Studio installer to install them is okay.
Then very probably need to need to fix npm canvas/cairo, following this instruction: https://github.com/benjamind/delarre.docpad/blob/master/src/documents/posts/installing-node-canvas-for-windows.html.md
then everything works
answered Jan 11 at 21:18
DiHan YangDiHan Yang
82
82
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53964498%2fnodejs-code-fails-to-build-on-windows10-but-works-on-macos-what-might-be-the-ca%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
gWQeY X4
1
Have you run
npm install
on Mac and then tried to use the same directory under Windows? If so, removenode_modules
and runnpm install
again, there might be native modules in there which are build for Mac instead of Windows.– Lukas Knuth
Dec 28 '18 at 21:42
also, it looks like "development" is mispelled.
– 4m1r
Dec 28 '18 at 22:19
Yes, I did run {npm install} on windows. There are several warns but no errors
– DiHan Yang
Dec 29 '18 at 0:22
Please check my instruction here, it might help: stackoverflow.com/a/50284712/7745569
– Eason Kang
Dec 29 '18 at 3:50