scratchfoundation / scratch-blocks

Scratch Blocks is a library for building creative computing interfaces.
https://scratch.mit.edu/developers
Apache License 2.0
2.58k stars 1.37k forks source link

notsup Not compatible with your operating system or architecture: fsevents@1.0.1 #674

Closed yonghuming closed 7 years ago

yonghuming commented 7 years ago

after i install scratch blocks via npm install, and then i run npm install and i got a error

root@iZ28g94hbuiZ:/var/www/html/scratch-blocks# npm install npm WARN lifecycle scratch-blocks@0.1.0~prepublish: cannot run in wd %s %s (wd=%s) scratc npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.1 r

dekrain commented 7 years ago

But which OS do you have

dekrain commented 7 years ago

Do not use npm install. Instead go to test/vertical_playground.html

tmickel commented 7 years ago

@rschamp ideas on this?

yonghuming commented 7 years ago

@dekrain i use Ubuntu 14.04 lts

yonghuming commented 7 years ago

@dekrain do you mean after i git clone scratch-blocks rep,i just go to tests? when i go test/vertical_playground.html,is does not show closure-related error but can not work rightly http://langxm.cn/scratch-blocks/tests/horizontal_playground.html

dekrain commented 7 years ago

You must have Google closure library. If you get alert, go to link on that alert.

dekrain commented 7 years ago

If you want to just play in scratch-vm, just go here.

rschamp commented 7 years ago

@yonghuming The first error is truncated. Would you please paste the full text of it?

I believe I've seen the second warning about fsevents before and it can be ignored.

To fix your issue with closure, you can symlink the closure library included as a dependency by running this from your scratch-blocks directory:

ln -s $(npm root)/google-closure-library ../closure-library
yonghuming commented 7 years ago

root@iZ28g94hbuiZ:/var/www/html/sb# npm install npm WARN lifecycle scratch-blocks@0.1.0~prepublish: cannot run in wd %s %s (wd=%s) scratch-blocks@0.1.0 python ./build.py && ./node_modules/.bin/webpack /var/www/html/sb npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

yonghuming commented 7 years ago

i try ln -s $(npm root)/google-closure-library ../closure-library in the scratch-blocks root,but it does not work

yonghuming commented 7 years ago

root@iZ28g94hbuiZ:/var/www/html/sb# npm install npm WARN lifecycle scratch-blocks@0.1.0~prepublish: cannot run in wd %s %s (wd=%s) scratch-blocks@0.1.0 python ./build.py && ./node_modules/.bin/webpack /var/www/html/sb npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) root@iZ28g94hbuiZ:/var/www/html/sb# ln -s $(npm root)/google-closure-library ../closure-library ln: failed to create symbolic link ‘../closure-library/google-closure-library’: File exists root@iZ28g94hbuiZ:/var/www/html/sb#

yonghuming commented 7 years ago

http://langxm.cn/sb/tests/horizontal_playground.html i vist this page,but it does not alert any error but it can not drag either

yonghuming commented 7 years ago

`2083 ll 2084 cd .. 2085 ll 2086 rm -r sb/ 2087 cd scratch-blocks/ 2088 ll 2089 cd .. 2090 ll 2091 cp closure-library/ closure-library.bak 2092 ll 2093 cp -r closure-library/ closure-library.bak 2094 ll 2095 rm closure-library 2096 rm -r closure-library 2097 ll 2098 cd scratch-blocks/ 2099 ll 2100 ln -s $(npm root)/google-closure-library ../closure-library 2101 ll 2102 cd .. 2103 ll 2104 cd scratch-blocks/ 2105 ll 2106 npm install 2107 history root@iZ28g94hbuiZ:/var/www/html/scratch-blocks# q

blockly works properly

http://langxm.cn/blockly/tests/playground.html

`

dekrain commented 7 years ago

Use

\```
Your logs here...
\```
yonghuming commented 7 years ago
pm install
npm WARN lifecycle scratch-blocks@0.1.0~prepublish: cannot run in wd %s %s (wd=%s) scratch-blocks@0.1.0 python ./build.py && ./node_modules/.bin/webpack /var/www/html/scratch-blocks
scratch-blocks@0.1.0 /var/www/html/scratch-blocks
├─┬ eslint@2.9.0 
│ ├─┬ chalk@1.1.3 
│ │ ├── ansi-styles@2.2.1 
│ │ ├── escape-string-regexp@1.0.5 
│ │ ├── has-ansi@2.0.0 
│ │ ├── strip-ansi@3.0.1 
│ │ └── supports-color@2.0.0 
│ ├─┬ concat-stream@1.5.2 
│ │ ├── inherits@2.0.3 
│ │ ├─┬ readable-stream@2.0.6 
│ │ │ ├── core-util-is@1.0.2 
│ │ │ ├── process-nextick-args@1.0.7 
│ │ │ └── util-deprecate@1.0.2 
│ │ └── typedarray@0.0.6 
│ ├─┬ debug@2.2.0 
│ │ └── ms@0.7.1 
│ ├─┬ doctrine@1.5.0 
│ │ └── isarray@1.0.0 
│ ├─┬ es6-map@0.1.4 
│ │ ├── d@0.1.1 
│ │ ├── es5-ext@0.10.12 
│ │ ├── es6-iterator@2.0.0 
│ │ ├── es6-set@0.1.4 
│ │ ├── es6-symbol@3.1.0 
│ │ └── event-emitter@0.3.4 
│ ├─┬ escope@3.6.0 
│ │ ├── es6-weak-map@2.0.1 
│ │ └─┬ esrecurse@4.1.0 
│ │   └── estraverse@4.1.1 
│ ├─┬ espree@3.1.4 
│ │ └── acorn-jsx@3.0.1 
│ ├── estraverse@4.2.0 
│ ├── esutils@2.0.2 
│ ├─┬ file-entry-cache@1.3.1 
│ │ ├─┬ flat-cache@1.2.1 
│ │ │ ├── circular-json@0.3.1 
│ │ │ ├─┬ del@2.2.2 
│ │ │ │ ├─┬ globby@5.0.0 
│ │ │ │ │ └─┬ array-union@1.0.2 
│ │ │ │ │   └── array-uniq@1.0.3 
│ │ │ │ ├── is-path-cwd@1.0.0 
│ │ │ │ ├─┬ is-path-in-cwd@1.0.0 
│ │ │ │ │ └── is-path-inside@1.0.0 
│ │ │ │ ├── pify@2.3.0 
│ │ │ │ ├─┬ pinkie-promise@2.0.1 
│ │ │ │ │ └── pinkie@2.0.4 
│ │ │ │ └── rimraf@2.5.4 
│ │ │ └── write@0.2.1 
│ │ └── object-assign@4.1.0 
│ ├─┬ glob@7.1.1 
│ │ ├── fs.realpath@1.0.0 
│ │ ├─┬ inflight@1.0.6 
│ │ │ └── wrappy@1.0.2 
│ │ ├─┬ minimatch@3.0.3 
│ │ │ └─┬ brace-expansion@1.1.6 
│ │ │   ├── balanced-match@0.4.2 
│ │ │   └── concat-map@0.0.1 
│ │ └── once@1.4.0 
│ ├── globals@9.12.0 
│ ├── ignore@3.2.0 
│ ├── imurmurhash@0.1.4 
│ ├─┬ inquirer@0.12.0 
│ │ ├── ansi-escapes@1.4.0 
│ │ ├── ansi-regex@2.0.0 
│ │ ├─┬ cli-cursor@1.0.2 
│ │ │ └─┬ restore-cursor@1.0.1 
│ │ │   ├── exit-hook@1.1.1 
│ │ │   └── onetime@1.1.0 
│ │ ├── cli-width@2.1.0 
│ │ ├── figures@1.7.0 
│ │ ├─┬ readline2@1.0.1 
│ │ │ ├─┬ code-point-at@1.0.1 
│ │ │ │ └── number-is-nan@1.0.1 
│ │ │ ├── is-fullwidth-code-point@1.0.0 
│ │ │ └── mute-stream@0.0.5 
│ │ ├── run-async@0.1.0 
│ │ ├── rx-lite@3.1.2 
│ │ ├── string-width@1.0.2 
│ │ └── through@2.3.8 
│ ├─┬ is-my-json-valid@2.15.0 
│ │ ├── generate-function@2.0.0 
│ │ ├─┬ generate-object-property@1.2.0 
│ │ │ └── is-property@1.0.2 
│ │ ├── jsonpointer@4.0.0 
│ │ └── xtend@4.0.1 
│ ├─┬ is-resolvable@1.0.0 
│ │ └── tryit@1.0.2 
│ ├─┬ js-yaml@3.6.1 
│ │ ├─┬ argparse@1.0.9 
│ │ │ └── sprintf-js@1.0.3 
│ │ └── esprima@2.7.3 
│ ├─┬ json-stable-stringify@1.0.1 
│ │ └── jsonify@0.0.0 
│ ├── lodash@4.16.4 
│ ├─┬ mkdirp@0.5.1 
│ │ └── minimist@0.0.8 
│ ├─┬ optionator@0.8.2 
│ │ ├── deep-is@0.1.3 
│ │ ├── fast-levenshtein@2.0.5 
│ │ ├── levn@0.3.0 
│ │ ├── prelude-ls@1.1.2 
│ │ ├── type-check@0.3.2 
│ │ └── wordwrap@1.0.0 
│ ├── path-is-absolute@1.0.1 
│ ├── path-is-inside@1.0.2 
│ ├── pluralize@1.2.1 
│ ├── progress@1.1.8 
│ ├─┬ require-uncached@1.0.2 
│ │ ├─┬ caller-path@0.1.0 
│ │ │ └── callsites@0.2.0 
│ │ └── resolve-from@1.0.1 
│ ├── shelljs@0.6.1 
│ ├── strip-json-comments@1.0.4 
│ ├─┬ table@3.8.0 
│ │ ├─┬ ajv@4.7.7 
│ │ │ └── co@4.6.0 
│ │ ├── ajv-keywords@1.1.1 
│ │ └── slice-ansi@0.0.4 
│ ├── text-table@0.2.0 
│ └─┬ user-home@2.0.0 
│   └── os-homedir@1.0.2 
├─┬ exports-loader@0.6.3 
│ ├─┬ loader-utils@0.2.16 
│ │ ├── big.js@3.1.3 
│ │ ├── emojis-list@2.1.0 
│ │ └── json5@0.5.0 
│ └─┬ source-map@0.1.43 
│   └── amdefine@1.0.0 
├── google-closure-library@20160911.0.0 
├── imports-loader@0.6.5 
├── json@9.0.4 
├── travis-after-all@1.4.4 
└─┬ webpack@1.13.2 
  ├── acorn@3.3.0 
  ├── async@1.5.2 
  ├── clone@1.0.2 
  ├─┬ enhanced-resolve@0.9.1 
  │ ├── graceful-fs@4.1.9 
  │ └── memory-fs@0.2.0 
  ├── interpret@0.6.6 
  ├─┬ memory-fs@0.3.0 
  │ └─┬ errno@0.1.4 
  │   └── prr@0.0.0 
  ├─┬ node-libs-browser@0.6.0 
  │ ├── assert@1.4.1 
  │ ├─┬ browserify-zlib@0.1.4 
  │ │ └── pako@0.2.9 
  │ ├─┬ buffer@4.9.1 
  │ │ ├── base64-js@1.2.0 
  │ │ └── ieee754@1.1.8 
  │ ├─┬ console-browserify@1.1.0 
  │ │ └── date-now@0.1.4 
  │ ├── constants-browserify@0.0.1 
  │ ├─┬ crypto-browserify@3.2.8 
  │ │ ├── pbkdf2-compat@2.0.1 
  │ │ ├── ripemd160@0.2.0 
  │ │ └── sha.js@2.2.6 
  │ ├── domain-browser@1.1.7 
  │ ├── events@1.1.1 
  │ ├─┬ http-browserify@1.7.0 
  │ │ └── Base64@0.2.1 
  │ ├── https-browserify@0.0.0 
  │ ├── os-browserify@0.1.2 
  │ ├── path-browserify@0.0.0 
  │ ├── process@0.11.9 
  │ ├── punycode@1.4.1 
  │ ├── querystring-es3@0.2.1 
  │ ├─┬ readable-stream@1.1.14 
  │ │ └── isarray@0.0.1 
  │ ├─┬ stream-browserify@1.0.0 
  │ │ └─┬ readable-stream@1.1.14 
  │ │   └── isarray@0.0.1 
  │ ├── string_decoder@0.10.31 
  │ ├── timers-browserify@1.4.2 
  │ ├── tty-browserify@0.0.0 
  │ ├─┬ url@0.10.3 
  │ │ ├── punycode@1.3.2 
  │ │ └── querystring@0.2.0 
  │ ├─┬ util@0.10.3 
  │ │ └── inherits@2.0.1 
  │ └─┬ vm-browserify@0.0.4 
  │   └── indexof@0.0.1 
  ├─┬ optimist@0.6.1 
  │ └── wordwrap@0.0.3 
  ├─┬ supports-color@3.1.2 
  │ └── has-flag@1.0.0 
  ├── tapable@0.1.10 
  ├─┬ uglify-js@2.6.4 
  │ ├── async@0.2.10 
  │ ├── source-map@0.5.6 
  │ ├── uglify-to-browserify@1.0.2 
  │ └─┬ yargs@3.10.0 
  │   ├── camelcase@1.2.1 
  │   ├─┬ cliui@2.1.0 
  │   │ ├─┬ center-align@0.1.3 
  │   │ │ ├─┬ align-text@0.1.4 
  │   │ │ │ ├── longest@1.0.1 
  │   │ │ │ └── repeat-string@1.5.4 
  │   │ │ └── lazy-cache@1.0.4 
  │   │ ├── right-align@0.1.3 
  │   │ └── wordwrap@0.0.2 
  │   ├── decamelize@1.2.0 
  │   └── window-size@0.1.0 
  ├─┬ watchpack@0.2.9 
  │ ├── async@0.9.2 
  │ └─┬ chokidar@1.6.0 
  │   ├─┬ anymatch@1.3.0 
  │   │ ├── arrify@1.0.1 
  │   │ └─┬ micromatch@2.3.11 
  │   │   ├─┬ arr-diff@2.0.0 
  │   │   │ └── arr-flatten@1.0.1 
  │   │   ├── array-unique@0.2.1 
  │   │   ├─┬ braces@1.8.5 
  │   │   │ ├─┬ expand-range@1.8.2 
  │   │   │ │ └─┬ fill-range@2.2.3 
  │   │   │ │   ├── is-number@2.1.0 
  │   │   │ │   ├── isobject@2.1.0 
  │   │   │ │   └── randomatic@1.1.5 
  │   │   │ ├── preserve@0.2.0 
  │   │   │ └── repeat-element@1.1.2 
  │   │   ├─┬ expand-brackets@0.1.5 
  │   │   │ └── is-posix-bracket@0.1.1 
  │   │   ├── extglob@0.3.2 
  │   │   ├── filename-regex@2.0.0 
  │   │   ├─┬ kind-of@3.0.4 
  │   │   │ └── is-buffer@1.1.4 
  │   │   ├── normalize-path@2.0.1 
  │   │   ├─┬ object.omit@2.0.0 
  │   │   │ ├─┬ for-own@0.1.4 
  │   │   │ │ └── for-in@0.1.6 
  │   │   │ └── is-extendable@0.1.1 
  │   │   ├─┬ parse-glob@3.0.4 
  │   │   │ ├── glob-base@0.3.0 
  │   │   │ └── is-dotfile@1.0.2 
  │   │   └─┬ regex-cache@0.4.3 
  │   │     ├── is-equal-shallow@0.1.3 
  │   │     └── is-primitive@2.0.0 
  │   ├── async-each@1.0.1 
  │   ├── glob-parent@2.0.0 
  │   ├─┬ is-binary-path@1.0.1 
  │   │ └── binary-extensions@1.7.0 
  │   ├─┬ is-glob@2.0.1 
  │   │ └── is-extglob@1.0.0 
  │   └─┬ readdirp@2.1.0 
  │     └── set-immediate-shim@1.0.1 
  └─┬ webpack-core@0.6.8 
    ├── source-list-map@0.1.6 
    └── source-map@0.4.4 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
root@iZ28g94hbuiZ:/var/www/html/scratch-blocks# 
dekrain commented 7 years ago

without \

tmickel commented 7 years ago

@yonghuming The link http://langxm.cn/sb/tests/horizontal_playground.html doesn't work for me. Is it still active?

Unfortunately, that log doesn't seem to expose any useful error.

yonghuming commented 7 years ago

@tmickel http://eeyi.org/scratch-blocks/tests/horizontal_playground.html

yonghuming commented 7 years ago

@tmickel i am sorry, i just rm -r sb,and try git clone ,npm install and symblink again

tmickel commented 7 years ago

@yonghuming Your copy of scratch-blocks appears not to be built.

Try going to the /scratch-blocks/ directory and running: npm run prepublish.

yonghuming commented 7 years ago

i found http://eeyi.org/scratch-blocks/blockly_uncompressed_horizontal.js Failed to load resource: the server responded with a status of 404 (Not Found) in the chrome console,maybe i need to build?

tmickel commented 7 years ago

@yonghuming yes - try npm run prepublish or ./build.py

yonghuming commented 7 years ago

@tmickel ig to log

root@iZ28g94hbuiZ:/var/www/html/scratch-blocks# npm run prepublish

> scratch-blocks@0.1.0 prepublish /var/www/html/scratch-blocks
> python ./build.py && ./node_modules/.bin/webpack

Traceback (most recent call last):
  File "i18n/js_to_json.py", line 120, in <module>
    main()
  File "i18n/js_to_json.py", line 108, in main
    write_files(args.author, args.lang, args.output_dir, results, False)
  File "/var/www/html/scratch-blocks/i18n/common.py", line 210, in write_files
    lang_file = _create_lang_file(author, lang, output_dir)
  File "/var/www/html/scratch-blocks/i18n/common.py", line 128, in _create_lang_file
    lang_file = codecs.open(lang_file_name, 'w', 'utf-8')
  File "/usr/lib/python2.7/codecs.py", line 878, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: './msg/json/en.json'
('Error running i18n/js_to_json.py: ', CalledProcessError())
SUCCESS: blockly_uncompressed_horizontal.js
SUCCESS: blockly_uncompressed_vertical.js
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "./build.py", line 179, in run
    self.gen_core(True)
  File "./build.py", line 214, in gen_core
    self.do_compile(params, target_filename, filenames, "")
  File "./build.py", line 255, in do_compile
    conn.request("POST", "/compile", urllib.urlencode(params), headers)
  File "/usr/lib/python2.7/httplib.py", line 979, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1013, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 835, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 797, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 778, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
error: [Errno 110] Connection timed out

Hash: 37c5cb6a75b0129247da
Version: webpack 1.13.2
Time: 349ms
        Asset     Size  Chunks             Chunk Names
horizontal.js  96.4 kB       0  [emitted]  horizontal
  vertical.js  96.5 kB       1  [emitted]  vertical
   [0] ./shim/horizontal.js 161 bytes {0} [built]
   [0] ./shim/vertical.js 157 bytes {1} [built]
   [2] ./shim/blocks_compressed_horizontal.js 148 bytes {0} [built] [1 error]
   [3] ./shim/blockly_compressed_horizontal.goog.js 66 bytes {0} [built]
   [4] ./shim/blockly_compressed_horizontal.js 104 bytes {0} [built] [1 error]
   [6] ./shim/blocks_compressed_vertical.js 189 bytes {1} [built] [1 error]
   [7] ./shim/blockly_compressed_vertical.goog.js 64 bytes {1} [built]
   [8] ./shim/blockly_compressed_vertical.js 102 bytes {1} [built] [1 error]
    + 2 hidden modules

ERROR in ./shim/blocks_compressed_horizontal.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../blocks_compressed_horizontal in /var/www/html/scratch-blocks/shim
 @ ./shim/blocks_compressed_horizontal.js 1:17-146

ERROR in ./shim/blocks_compressed_vertical.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../blocks_compressed_vertical in /var/www/html/scratch-blocks/shim
 @ ./shim/blocks_compressed_vertical.js 1:17-187

ERROR in ./shim/blockly_compressed_horizontal.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../blockly_compressed_horizontal in /var/www/html/scratch-blocks/shim
 @ ./shim/blockly_compressed_horizontal.js 1:17-102

ERROR in ./shim/blockly_compressed_vertical.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../blockly_compressed_vertical in /var/www/html/scratch-blocks/shim
 @ ./shim/blockly_compressed_vertical.js 1:17-100
root@iZ28g94hbuiZ:/var/www/html/scratch-blocks# 
yonghuming commented 7 years ago

i seems work now ,but also an error horizontal_playground.html:1 Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

yonghuming commented 7 years ago

there is indeed no such file or directory

tmickel commented 7 years ago

@yonghuming The first is a known issue with Blockly: https://github.com/google/blockly/issues/299

The second we should investigate separately.

I'm going to close this issue since the error message is not a problem.

rschamp commented 7 years ago

@yonghuming The cannot run in wd %s %s (wd=%s) error means that the user running the command doesn't have permissions for the directory. Your user must have read and write permissions for the scratch-blocks and ../closure-library directories. It looks like when you checked out a new copy, this was resolved, so this is for you to be aware of in the future.

In your latest stack trace it says error: [Errno 110] Connection timed out, which means that it lost the network connection while it was trying to run the closure compiler. You should try to run ./build.py again to avoid that.

Regarding the error IOError: [Errno 2] No such file or directory: './msg/json/en.json' @rachel-fenichel It looks like this was removed in https://github.com/LLK/scratch-blocks/pull/667/commits/79013d14fbe8f3ca9ff88920d4db762f3679b607?

yonghuming commented 7 years ago

@tmickel maybe it's because the branch /msg/json/en.json is in the deture branch ,and i git develop branch

yonghuming commented 7 years ago

@rschamp i am root user,my the net problem

rschamp commented 7 years ago

@yonghuming I see — running as the root user will also cause problems because npm tries to run as a user with limited privileges. You shouldn't run npm install as the root user because if you accidentally install the wrong package, the install script could do anything to your system. You should run as a regular user. If you must run as the root user, then you need to run with npm install --unsafe-perm. However I have to emphasize that you should not do this. See https://docs.npmjs.com/misc/scripts#user

yonghuming commented 7 years ago

ok thank you very much @rschamp

yonghuming commented 7 years ago

http://langxm.cn/scratch-blocks-feature-variable_management/tests/vertical_playground.html @rschamp