jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.66k stars 515 forks source link

When I build the web,I got the error. #283

Closed kkqy closed 7 years ago

kkqy commented 7 years ago
E:\Data\Projects\Git\OpenJSCAD>npm run build-web

> @jscad/openjscad@1.0.1 build-web E:\Data\Projects\Git\OpenJSCAD
> browserify src/ui/index.js -o dist/index.js -t [babelify browserify minifyify]

Error: Cannot find module '../../../../_is-buffer@1.1.5@is-buffer/index.js' from 'E:\Data\Projects\Git\OpenJSCAD\node_modules\_core-util-is@1.0.2@core-util-is\lib'
    at E:\Data\Projects\Git\OpenJSCAD\node_modules\_resolve@1.1.7@resolve\lib\async.js:55:21
    at load (E:\Data\Projects\Git\OpenJSCAD\node_modules\_resolve@1.1.7@resolve\lib\async.js:69:43)
    at onex (E:\Data\Projects\Git\OpenJSCAD\node_modules\_resolve@1.1.7@resolve\lib\async.js:92:31)
    at E:\Data\Projects\Git\OpenJSCAD\node_modules\_resolve@1.1.7@resolve\lib\async.js:22:47
    at FSReqWrap.oncomplete (fs.js:152:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @jscad/openjscad@1.0.1 build-web: `browserify src/ui/index.js -o dist/index.js -t [babelify browserify minifyify]`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @jscad/openjscad@1.0.1 build-web 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!     D:\Soft\nodejs\_logs\2017-08-09T07_16_15_864Z-debug.log

I have installed all node modules that the project need. It seems like that the browserify got a wrong relative path.

The OS of my computer is Windows 10, the version of nodejs is 8.2.1 .

z3dev commented 7 years ago

@KuoKongQingYun We have not certified using NODEJS 8 Please back up to NODEJS 6, and use the latest LST

I suggest that you start with a new installation of OpenJSCAD as well.

kaosat-dev commented 7 years ago

@KuoKongQingYun It could also be a Windows specific issue (we have not tested things on Windows). Did you run into any issues with npm install itself ?

kkqy commented 7 years ago

@z3dev hello,I changed the version of node to 6.11.2 that is the latest LST version,but the error still exists.

@kaosat-dev Yes,I think it is a windows specific issue too.I do the same work on Linux,and everything is Ok. When I use node 8.x,there is no issue during installing,but there is a compiling issue about node-gyp when I run "npm install" with node 6.x on Windows. I think that this is a compatibility issues about Visual Studio 2017,I search the compiling issue by Google, and it tell me that the error is not important and we can ignore it. but no matter what version of node I use on Windows, the error

Error: Cannot find module '../../../../_is-buffer@1.1.5@is-buffer/index.js' from 'E:\Data\Projects\Git\OpenJSCAD\node_modules_core-util-is@1.0.2@core-util-is\lib'

always exists when I run "npm run build-web".

kaosat-dev commented 7 years ago

@KuoKongQingYun hmm that is too bad, I'll try to find where the issue comes from : this one also seems identical but not Windows related : https://github.com/substack/node-browserify/issues/1531

kkqy commented 7 years ago

@kaosat-dev How incredible it is ! I reinstalled nodejs and reinstalled those node-modules once more just now, it works well now! I remember that I did the same things many times before,I don't know what difference happened this time and why it works now LOL~

kaosat-dev commented 7 years ago

@KuoKongQingYun haha , well glad it works now at least :) If it happens again, please let us know

zhaochy1990 commented 7 years ago

This problem happens on my computer.... I tried to reinstall node-modules several times, but it still there I'm using node 6.9.5 and npm 3.10.10

Error: Cannot find module '../../../../_is-buffer@1.1.5@is-buffer/index.js' from '/Users/zhaochy/dev/blockchain/bartok/packages/bartok-runtime-cc-wrapper/node_modules/_core-util-is@1.0.2@core-util-is/lib'
lerna ERR! execute     at /Users/zhaochy/dev/blockchain/bartok/packages/bartok-runtime-cc-wrapper/node_modules/_resolve@1.1.7@resolve/lib/async.js:55:21
lerna ERR! execute     at load (/Users/zhaochy/dev/blockchain/bartok/packages/bartok-runtime-cc-wrapper/node_modules/_resolve@1.1.7@resolve/lib/async.js:69:43)
lerna ERR! execute     at onex (/Users/zhaochy/dev/blockchain/bartok/packages/bartok-runtime-cc-wrapper/node_modules/_resolve@1.1.7@resolve/lib/async.js:92:31)
lerna ERR! execute     at /Users/zhaochy/dev/blockchain/bartok/packages/bartok-runtime-cc-wrapper/node_modules/_resolve@1.1.7@resolve/lib/async.js:22:47
lerna ERR! execute     at FSReqWrap.oncomplete (fs.js:123:15)
lerna ERR! execute
lerna ERR! execute npm ERR! Darwin 16.7.0
lerna ERR! execute npm ERR! argv "/Users/zhaochy/software/npm/lib/node_modules/bin/node" "/Users/zhaochy/software/npm/lib/node_modules/bin/npm" "run" "prepublish"
lerna ERR! execute npm ERR! node v6.9.5
lerna ERR! execute npm ERR! npm  v3.10.10
lerna ERR! execute npm ERR! code ELIFECYCLE
lerna ERR! execute npm ERR! bartok-microservice@0.1.0 prepublish: `NODE_PATH=node_modules node ./scripts/build.js`
lerna ERR! execute npm ERR! Exit status 1
kaosat-dev commented 7 years ago

@zhaochy1990 : how did you install node & npm please?

kkqy commented 7 years ago

@zhaochy1990 Did you use the cnpm of taobao? Just use npm to install modules instead of cnpm. I found that the cnpm may has a bug which will cause this problem!

zhaochy1990 commented 7 years ago

oh, I tried again, it seems the problem is caused by cnpm. Fixed, thank you

kaosat-dev commented 7 years ago

thanks for finding the reason for this @KuoKongQingYun !

z3dev commented 7 years ago

@KuoKongQingYun

Can you provide the OS, the NPM being used? It would be great reference.

kkqy commented 7 years ago

@z3dev The cnpm is a "special" version of npm which is used to speed up installing modules in China.(See detail:https://github.com/cnpm/cnpm) Generally, The cnpm should behave as same as standard npm,but It seems like that there is a hidden bug in cnpm which cause the problem. I created an issue in the project of cnpm: https://github.com/cnpm/cnpm/issues/214. and hope that they will fix it.

z3dev commented 7 years ago

@KuoKongQingYun Understood.

Please provide your

Thnaks

kkqy commented 7 years ago

OS:Windows 10 14393.693 NPM:5.3.0 Node:v6.11.2 LTS @z3dev I upgraded the npm because the old npm in official package of Node 6.11.2 can't work well with Visual Studio 2017.