Estoy iniciándome en nodejs y he visto lo que se puede hacer en tiempo real con parcel-bundler pero tengo problemas para escuchar el archivo o carpeta en cuestión.
El sistema me tira error Path must be a string. Received null
Adjunto comando completos del terminal con sus respectivos errores a ver si alguien puede ayudarme.
He probado a reinstalar todo, reiniciar, instalar en global (-g) o en directorio y no hay forma..
Adjunto el terminal:
Código:
Muchas gracias de antemano iMac-de-iMachito:~ imachito$ npm init -y Wrote to /Users/imachito/package.json: { "name": "imachito", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC" } iMac-de-iMachito:~ imachito$ sudo npm install parcel-bundler -g /usr/local/bin/parcel -> /usr/local/lib/node_modules/parcel-bundler/bin/cli.js > [email protected] install /usr/local/lib/node_modules/parcel-bundler/node_modules/fsevents > node install [fsevents] Success: "/usr/local/lib/node_modules/parcel-bundler/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x 64/fse.node" already installed Pass --update-binary to reinstall or --build-from-source to recompile > [email protected] install /usr/local/lib/node_modules/parcel-bundler/node_modules/deasync > node ./build.js `darwin-x64-node-8` exists; testing Binary is fine; exiting > [email protected] postinstall /usr/local/lib/node_modules/parcel-bundler > node -e "console.log('\u001b[35m\u001b[1mLove Parcel? You can now donate to our open collective:\u001b[22m\u001b[39m\n >\u001b[34mhttps://opencollective.com/parcel/donate\u001b[0m')" Love Parcel? You can now donate to our open collective: > https://opencollective.com/parcel/donate + [email protected] added 812 packages in 36.128s iMac-de-iMachito:~ imachito$ parcel /Users/imachito/Documents/pruebas/src/index.html Server running at http://localhost:1234 🚨 /Users/imachito/Documents/pruebas/src/index.html: Path must be a string. Received null at assertPath (path.js:28:11) at Object.join (path.js:1236:7) at module.exports (/usr/local/lib/node_modules/parcel-bundler/src/utils/urlJoin.js:11:29) at HTMLAsset.processSingleDependency (/usr/local/lib/node_modules/parcel-bundler/src/assets/HTMLAsset.js:91:19) at ast.walk.node (/usr/local/lib/node_modules/parcel-bundler/src/assets/HTMLAsset.js:138:43) at traverse (/usr/local/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:105:26) at traverse (/usr/local/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:111:5) at traverse (/usr/local/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:105:17) at traverse (/usr/local/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:111:5) at traverse (/usr/local/lib/node_modules/parcel-bundler/node_modules/posthtml/lib/api.js:105:17)