Cannot install the latest @next version of parcel.
an error occurs in the source-map script.
parcel should install
yarn add [email protected] fails
npm install [email protected] fails
LOG:
yarn global add parcel@next
yarn global v1.17.3
[1/4] ๐ Resolving packages...
warning npm > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning npm > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning npx > npm > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning npx > npm > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning npx > npm > pacote > make-fetch-happen > socks-proxy-agent > [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
warning npx > npm > npm-registry-client > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning npx > npm > request > [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning npx > npm > request > hawk > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning npx > npm > request > hawk > [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning npx > npm > request > hawk > sntp > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning npx > npm > request > hawk > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning npx > npm > request > hawk > boom > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning npx > npm > request > hawk > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning npx > npm > request > hawk > cryptiles > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning parcel > @parcel/config-default > @parcel/optimizer-htmlnano > htmlnano > uncss > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning parcel > @parcel/config-default > @parcel/optimizer-htmlnano > htmlnano > uncss > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning parcel > @parcel/config-default > @parcel/reporter-dev-server > http-proxy-middleware > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning parcel > @parcel/config-default > @parcel/reporter-dev-server > http-proxy-middleware > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
[2/4] ๐ Fetching packages...
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
warning @parcel/[email protected]: The engine "parcel" appears to be invalid.
[3/4] ๐ Linking dependencies...
[4/4] ๐จ Building fresh packages...
[-/5] โข waiting...
[2/5] โข @parcel/source-map
[-/5] โข waiting...
[-/5] โข waiting...
error /Users/xxx/.config/yarn/global/node_modules/@parcel/source-map: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/xxx/.config/yarn/global/node_modules/@parcel/source-map
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/xxx/.config/yarn/global/node_modules/@parcel/source-map/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/xxx/Library/Caches/node-gyp/12.12.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/xxx/Library/Caches/node-gyp/12.12.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/xxx/Library/Caches/node-gyp/12.12.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/xxx/.config/yarn/global/node_modules/@parcel/source-map',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o
LIBTOOL-STATIC Release/nothing.a
Traceback (most recent call last):
File "./gyp-mac-tool", line 611, in <module>
sys.exit(main(sys.argv[1:]))
File "./gyp-mac-tool", line 30, in main
exit_code = executor.Dispatch(args)
File "./gyp-mac-tool", line 45, in Dispatch
return getattr(self, method)(*args[1:])
File "./gyp-mac-tool", line 248, in ExecFilterLibtool
if not libtool_re.match(line) and not libtool_re5.match(line):
TypeError: cannot use a string pattern on a bytes-like object
make: *** [Release/nothing.a] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/xxx/.config/yarn/global/node_modules/@parcel/source-map
yarn global v1.17.3
Not entirely sure why this fails it should come with prebuilds. Especially on Mac OS X. It might be trying to install an old version?
Unless you're running 32-bit it should be there: https://unpkg.com/browse/@parcel/source[email protected]/prebuilds/darwin-x64/
I'm on MacOS Catalina 10.15.3
I do see the prebuilds in my node_modules as well.
~(The node-gyp error seems to be related to Python 2/3, somehow only Python 2 is supported?)
https://github.com/atom/git-utils/issues/72#issuecomment-263755735~
Python 2 indeed being used...
@mischnic any clue why it's even running node-gyp rebuild in the first place?
No.
@MarkLyck
/Users/xxx/.config/yarn/global/node_modules/@parcel/source-map/prebuilds/darwin-x64/node.napi.glibc.node exist?yarn node-gyp-build-test in /Users/xxx/.config/yarn/global/node_modules/@parcel/source-map print? It should print nothing and if the prebuilds couldn't be found Error: No native build was found for ....@mischnic
Yes /node_modules/@parcel/source-map/prebuilds/darwin-x64/node.napi.glibc.node does exist
running that in source-map:
yarn node-gyp-build-test
yarn run v1.17.3
$ /Users/xxx/colony/colony-app/node_modules/@parcel/source-map/node_modules/.bin/node-gyp-build-test
โจ Done in 0.48s.
@DeMoorJasper No idea
Running into this error in windows because it is looking for python.
Is python a dependency to install parcel2?
error C:\Users\user\code\parcelv2\node_modules\@parcel\source-map: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\Users\user\code\parcelv2\node_modules\@parcel\source-map
Output:
C:\Users\user\code\parcelv2\node_modules\@parcel\source-map>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\user\code\parcelv2\node_modules\@parcel\source-map
gyp ERR! node -v v10.16.0
@aarjithn it is for building native node modules using node-gyp but that should not be necessary on windows, mac, linux and alpine linux. I have no clue why it is even running node-gyp in the first place especially rebuild, it should just detect a prebuild and use that
Thanks @DeMoorJasper, makes sense.
I can confirm /node_modules/@parcel/source-map/prebuilds/win32-x64/node.napi.glibc.node is present, also running yarn node-gyp-build-test says Done in 0.31s.
(Previously I ran the command incorrectly. Have edited comment to avoid confusion, thanks again @DeMoorJasper
@aarjithn I think you ran that command in your project and not inside the folder where source-map has been installed. You should run that command in <your project directory>/node_modules/@parcel/source-map
This is the package.json of @parcel/[email protected] that npm installs:
There is a "install": "node-gyp rebuild" script that we did not specify
{
// ...
"license": "MIT",
"main": "./dist/node.js",
"name": "@parcel/source-map",
"scripts": {
"benchmark": "npm run benchmark:node && npm run benchmark:wasm",
"benchmark:node": "cross-env BACKEND=node node ./bench/run",
"benchmark:wasm": "cross-env BACKEND=wasm node ./bench/run",
"build:dev": "node-gyp rebuild --debug",
"compile-wasm": "make",
"install": "node-gyp rebuild", /// <<-------- where does this come from?
"lint": "prettier --write src/*.js",
"postinstall": "node-gyp-build",
"prebuild": "prebuildify --napi --strip --tag-libc",
"prepublish": "npm run transpile",
"rebuild": "rm -rf build && yarn build:dev",
"test": "npm run test:node && npm run test:wasm",
"test:node": "cross-env BACKEND=node mocha ./test/*.test.js",
"test:wasm": "cross-env BACKEND=wasm mocha ./test/*.test.js",
"transpile": "babel ./src/*.js --out-dir ./dist && flow-copy-source -v src dist",
"typecheck": "flow"
},
"version": "2.0.0-alpha.4.7"
}
Compare to: https://unpkg.com/browse/@parcel/source[email protected]/package.json
Great, npm adds this as a default value: https://docs.npmjs.com/misc/scripts#default-values
@mischnic wow that's strange, npm shouldn't be modifying anything to a deploy... anyway great discovery will merge your PR and close of this issue :)
npm shouldn't be modifying anything to a deploy
(This happens during npm install)